From 8e9125f7a427ea87d2dd0993ba2897388ce7b816 Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Fri, 2 Aug 2024 15:48:49 -0400 Subject: [PATCH 1/8] feat: prototype 3.0 model Signed-off-by: Keith Zantow --- .github/workflows/build.yml | 2 +- Makefile | 3 +- go.mod | 8 +- go.sum | 9 - spdx/v3/v3_0/model.go | 11741 ++++++++++++++++++++++++++++++++ spdx/v3/v3_0/relationships.go | 15 + spdx/v3/v3_0/spdx.go | 206 + spdx/v3/v3_0/spdx_test.go | 211 + 8 files changed, 12183 insertions(+), 12 deletions(-) create mode 100644 spdx/v3/v3_0/model.go create mode 100644 spdx/v3/v3_0/relationships.go create mode 100644 spdx/v3/v3_0/spdx.go create mode 100644 spdx/v3/v3_0/spdx_test.go diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0dc3a9b9..7b3e99f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.18' + go-version: '1.20' - name: Run tests run: make test - name: Send coverage report to coveralls diff --git a/Makefile b/Makefile index 4dd9d534..b5f3765b 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,8 @@ format: .PHONY: unit unit: - go test -v -covermode=count -coverprofile=profile.cov ./... + go test -v -covermode=count -coverprofile=profile.cov.tmp ./... + cat profile.cov.tmp | grep -v /model.go > profile.cov # ignore generated model file .PHONY: fuzz fuzz: diff --git a/go.mod b/go.mod index d110234b..c2a28dab 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,17 @@ module github.com/spdx/tools-golang -go 1.13 +go 1.20 require ( github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 github.com/google/go-cmp v0.6.0 + github.com/pmezard/go-difflib v1.0.0 github.com/spdx/gordf v0.0.0-20201111095634-7098f93598fb github.com/stretchr/testify v1.9.0 sigs.k8s.io/yaml v1.4.0 ) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum index 3c8ec376..670b837c 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,5 @@ github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc= github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -10,18 +9,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/spdx/gordf v0.0.0-20201111095634-7098f93598fb h1:bLo8hvc8XFm9J47r690TUKBzcjSWdJDxmjXJZ+/f92U= github.com/spdx/gordf v0.0.0-20201111095634-7098f93598fb/go.mod h1:uKWaldnbMnjsSAXRurWqqrdyZen1R7kxl8TkmWk2OyM= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= diff --git a/spdx/v3/v3_0/model.go b/spdx/v3/v3_0/model.go new file mode 100644 index 00000000..0559cd78 --- /dev/null +++ b/spdx/v3/v3_0/model.go @@ -0,0 +1,11741 @@ +// Code generated by -m. DO NOT EDIT. +// +// SPDX-License-Identifier: MIT + +package v3_0 + +import ( + "encoding/json" + "errors" + "fmt" + "io" + "path" + "reflect" + "strings" +) + +// ldType is a 0-size data holder property type for type-level linked data +type ldType struct{} + +// ldContext is the holder for all known LD contexts and required definitions +type ldContext map[string]*serializationContext + +// RegisterTypes registers types to be used when serializing/deserialising documents +func (c ldContext) RegisterTypes(contextUrl string, types ...any) ldContext { + ctx := c[contextUrl] + if ctx == nil { + ctx = &serializationContext{ + contextUrl: contextUrl, + typeAlias: "type", // FIXME this needs to come from the LD context + iriToType: map[string]*typeContext{}, + typeToContext: map[reflect.Type]*typeContext{}, + } + c[contextUrl] = ctx + } + for _, typ := range types { + ctx.registerType(typ) + } + return c +} + +// IRIMap registers compact IRIs for the given type +func (c ldContext) IRIMap(contextUrl string, typ any, nameMap map[string]string) ldContext { + c.RegisterTypes(contextUrl) // ensure there is a context created + ctx := c[contextUrl] + + t := reflect.TypeOf(typ) + t = baseType(t) // types should be passed as pointers; we want the base types + tc := ctx.typeToContext[t] + if tc == nil { + ctx.registerType(typ) + tc = ctx.typeToContext[t] + } + for iri, compact := range nameMap { + tc.iriToName[iri] = compact + tc.nameToIri[compact] = iri + } + return c +} + +func (c ldContext) ToJSON(writer io.Writer, value any) error { + vals, err := c.toMaps(value) + if err != nil { + return err + } + enc := json.NewEncoder(writer) + enc.SetEscapeHTML(false) + return enc.Encode(vals) +} + +func (c ldContext) toMaps(o ...any) (values map[string]any, errors error) { + // the ld graph is referenced here + // traverse the go objects to output to the graph + builder := graphBuilder{ + ldc: c, + input: o, + ids: map[reflect.Value]string{}, + } + + var err error + var context *serializationContext + for _, o := range builder.input { + context, err = builder.add(o) + if err != nil { + return nil, err + } + } + + return map[string]any{ + ldContextProp: context.contextUrl, + ldGraphProp: builder.toGraph(), + }, nil +} + +func (c ldContext) FromJSON(reader io.Reader) ([]any, error) { + vals := map[string]any{} + dec := json.NewDecoder(reader) + err := dec.Decode(&vals) + if err != nil { + return nil, err + } + return c.FromMaps(vals) +} + +func (c ldContext) FromMaps(values map[string]any) ([]any, error) { + instances := map[string]reflect.Value{} + + var errs error + var graph []any + + context, _ := values[ldContextProp].(string) + currentContext := c[context] + if currentContext == nil { + return nil, fmt.Errorf("unknown document %s type: %v", ldContextProp, context) + } + + nodes, _ := values[ldGraphProp].([]any) + if nodes == nil { + return nil, fmt.Errorf("%s array not present in root object", ldGraphProp) + } + + // one pass to create all the instances + for _, node := range nodes { + _, err := c.getOrCreateInstance(currentContext, instances, anyType, node) + errs = appendErr(errs, err) + } + + // second pass to fill in all refs + for _, node := range nodes { + got, err := c.getOrCreateInstance(currentContext, instances, anyType, node) + errs = appendErr(errs, err) + if err == nil && got.IsValid() { + graph = append(graph, got.Interface()) + } + } + + return graph, errs +} + +func (c ldContext) getOrCreateInstance(currentContext *serializationContext, instances map[string]reflect.Value, expectedType reflect.Type, incoming any) (reflect.Value, error) { + if isPrimitive(expectedType) { + if convertedVal := convertTo(incoming, expectedType); convertedVal != emptyValue { + return convertedVal, nil + } + return emptyValue, fmt.Errorf("unable to convert incoming value to type %v: %+v", typeName(expectedType), incoming) + } + switch incoming := incoming.(type) { + case string: + instance := c.findById(currentContext, instances, incoming) + if instance != emptyValue { + return instance, nil + } + // not found: have a complex type with string indicates an IRI or other primitive + switch expectedType.Kind() { + case reflect.Pointer: + expectedType = expectedType.Elem() + if isPrimitive(expectedType) { + val, err := c.getOrCreateInstance(currentContext, instances, expectedType, incoming) + if err != nil { + return emptyValue, err + } + instance = reflect.New(expectedType) + instance.Elem().Set(val) + return instance, nil + } + if expectedType.Kind() == reflect.Struct { + return emptyValue, fmt.Errorf("unexpected pointer reference external IRI reference: %v", incoming) + } + fallthrough + case reflect.Struct: + instance = reflect.New(expectedType) + instance = instance.Elem() + err := c.setStructProps(currentContext, instances, instance, map[string]any{ + ldIDProp: incoming, + }) + return instance, err + case reflect.Interface: + return emptyValue, fmt.Errorf("unable to determine appropriate type for external IRI reference: %v", incoming) + default: + } + case map[string]any: + return c.getOrCreateFromMap(currentContext, instances, incoming) + } + return emptyValue, fmt.Errorf("unexpected data type: %#v", incoming) +} + +func convertTo(incoming any, typ reflect.Type) reflect.Value { + v := reflect.ValueOf(incoming) + if v.CanConvert(typ) { + return v.Convert(typ) + } + return emptyValue +} + +func (c ldContext) findById(_ *serializationContext, instances map[string]reflect.Value, incoming string) reflect.Value { + inst, ok := instances[incoming] + if ok { + return inst + } + return emptyValue +} + +func (c ldContext) getOrCreateFromMap(currentContext *serializationContext, instances map[string]reflect.Value, incoming map[string]any) (reflect.Value, error) { + typ, ok := incoming[ldTypeProp].(string) + if !ok && currentContext.typeAlias != "" { + typ, ok = incoming[currentContext.typeAlias].(string) + } + if !ok { + return emptyValue, fmt.Errorf("not a string") + } + + t, ok := currentContext.iriToType[typ] + if !ok { + return emptyValue, fmt.Errorf("don't have type: %v", typ) + } + + id, _ := incoming[ldIDProp].(string) + if id == "" && t.idProp != "" { + id, _ = incoming[t.idProp].(string) + } + inst, ok := instances[id] + if !ok { + inst = reflect.New(baseType(t.typ)) // New(T) returns *T + if id != "" { + // only set instance references when an ID is provided + instances[id] = inst + } + } + + // valid type, make a new one and fill it from the incoming maps + return inst, c.fill(currentContext, instances, inst, incoming) +} + +func (c ldContext) fill(currentContext *serializationContext, instances map[string]reflect.Value, instance reflect.Value, incoming any) error { + switch incoming := incoming.(type) { + case string: + inst := c.findById(currentContext, instances, incoming) + if inst != emptyValue { + return c.setValue(currentContext, instances, instance, inst) + } + // should be an incoming ID if string + return c.setValue(currentContext, instances, instance, map[string]any{ + ldIDProp: incoming, + }) + case map[string]any: + return c.setStructProps(currentContext, instances, instance, incoming) + } + return fmt.Errorf("unsupported incoming data type: %#v attempting to set instance: %#v", incoming, instance.Interface()) +} + +func (c ldContext) setValue(currentContext *serializationContext, instances map[string]reflect.Value, target reflect.Value, incoming any) error { + var errs error + typ := target.Type() + switch typ.Kind() { + case reflect.Slice: + switch incoming := incoming.(type) { + case []any: + return c.setSliceValue(currentContext, instances, target, incoming) + } + // try mapping a single value to an incoming slice + return c.setValue(currentContext, instances, target, []any{incoming}) + case reflect.Struct: + switch incoming := incoming.(type) { + case map[string]any: + return c.setStructProps(currentContext, instances, target, incoming) + case string: + // named individuals just need an object with the iri set + return c.setStructProps(currentContext, instances, target, map[string]any{ + ldIDProp: incoming, + }) + } + case reflect.Interface, reflect.Pointer: + switch incoming := incoming.(type) { + case string, map[string]any: + inst, err := c.getOrCreateInstance(currentContext, instances, typ, incoming) + errs = appendErr(errs, err) + if inst != emptyValue { + target.Set(inst) + return nil + } + } + default: + if newVal := convertTo(incoming, typ); newVal != emptyValue { + target.Set(newVal) + } else { + errs = appendErr(errs, fmt.Errorf("unable to convert %#v to %s, dropping", incoming, typeName(typ))) + } + } + return nil +} + +func (c ldContext) setStructProps(currentContext *serializationContext, instances map[string]reflect.Value, instance reflect.Value, incoming map[string]any) error { + var errs error + typ := instance.Type() + for typ.Kind() == reflect.Pointer { + instance = instance.Elem() + typ = instance.Type() + } + if typ.Kind() != reflect.Struct { + return fmt.Errorf("unable to set struct properties on non-struct type: %#v", instance.Interface()) + } + tc := currentContext.typeToContext[typ] + for i := 0; i < typ.NumField(); i++ { + field := typ.Field(i) + if skipField(field) { + continue + } + fieldVal := instance.Field(i) + + propIRI := field.Tag.Get(propIriTag) + if propIRI == "" { + continue + } + incomingVal, ok := incoming[propIRI] + if !ok { + compactIRI := field.Tag.Get(propIriCompactTag) + if compactIRI != "" { + incomingVal, ok = incoming[compactIRI] + } + } + if !ok { + continue + } + // don't set blank node IDs, these will be regenerated on output + if propIRI == ldIDProp { + if tc != nil { + if str, ok := incomingVal.(string); ok { + if fullIRI, ok := tc.nameToIri[str]; ok { + incomingVal = fullIRI + } + } + } + if isBlankNodeID(incomingVal) { + continue + } + } + errs = appendErr(errs, c.setValue(currentContext, instances, fieldVal, incomingVal)) + } + return errs +} + +func (c ldContext) setSliceValue(currentContext *serializationContext, instances map[string]reflect.Value, target reflect.Value, incoming []any) error { + var errs error + sliceType := target.Type() + if sliceType.Kind() != reflect.Slice { + return fmt.Errorf("expected slice, got: %#v", target) + } + sz := len(incoming) + if sz > 0 { + elemType := sliceType.Elem() + newSlice := reflect.MakeSlice(sliceType, 0, sz) + for i := 0; i < sz; i++ { + incomingValue := incoming[i] + if incomingValue == nil { + continue // don't allow null values + } + newItemValue, err := c.getOrCreateInstance(currentContext, instances, elemType, incomingValue) + errs = appendErr(errs, err) + if newItemValue != emptyValue { + // validate we can actually set the type + if newItemValue.Type().AssignableTo(elemType) { + newSlice = reflect.Append(newSlice, newItemValue) + } + } + } + target.Set(newSlice) + } + return errs +} + +func skipField(field reflect.StructField) bool { + return field.Type.Size() == 0 +} + +func typeName(t reflect.Type) string { + switch { + case isPointer(t): + return "*" + typeName(t.Elem()) + case isSlice(t): + return "[]" + typeName(t.Elem()) + case isMap(t): + return "map[" + typeName(t.Key()) + "]" + typeName(t.Elem()) + case isPrimitive(t): + return t.Name() + } + return path.Base(t.PkgPath()) + "." + t.Name() +} + +func isSlice(t reflect.Type) bool { + return t.Kind() == reflect.Slice +} + +func isMap(t reflect.Type) bool { + return t.Kind() == reflect.Map +} + +func isPointer(t reflect.Type) bool { + return t.Kind() == reflect.Pointer +} + +func isPrimitive(t reflect.Type) bool { + switch t.Kind() { + case reflect.String, + reflect.Int, + reflect.Int8, + reflect.Int16, + reflect.Int32, + reflect.Int64, + reflect.Uint, + reflect.Uint8, + reflect.Uint16, + reflect.Uint32, + reflect.Uint64, + reflect.Float32, + reflect.Float64, + reflect.Bool: + return true + default: + return false + } +} + +const ( + ldIDProp = "@id" + ldTypeProp = "@type" + ldContextProp = "@context" + ldGraphProp = "@graph" + typeIriTag = "iri" + typeIriCompactTag = "iri-compact" + propIriTag = "iri" + propIriCompactTag = "iri-compact" + typeIdPropTag = "id-prop" + propIsRequiredTag = "required" +) + +var ( + emptyValue reflect.Value + anyType = reflect.TypeOf((*any)(nil)).Elem() +) + +type typeContext struct { + typ reflect.Type + iri string + compact string + idProp string + iriToName map[string]string + nameToIri map[string]string +} + +type serializationContext struct { + contextUrl string + typeAlias string + iriToType map[string]*typeContext + typeToContext map[reflect.Type]*typeContext +} + +func fieldByType[T any](t reflect.Type) (reflect.StructField, bool) { + var v T + typ := reflect.TypeOf(v) + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if f.Type == typ { + return f, true + } + } + return reflect.StructField{}, false +} + +func (m *serializationContext) registerType(instancePointer any) { + t := reflect.TypeOf(instancePointer) + t = baseType(t) // types should be passed as pointers; we want the base types + + tc := m.typeToContext[t] + if tc != nil { + return // already registered + } + tc = &typeContext{ + typ: t, + iriToName: map[string]string{}, + nameToIri: map[string]string{}, + } + meta, ok := fieldByType[ldType](t) + if ok { + tc.iri = meta.Tag.Get(typeIriTag) + tc.compact = meta.Tag.Get(typeIriCompactTag) + tc.idProp = meta.Tag.Get(typeIdPropTag) + } + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if !isIdField(f) { + continue + } + compactIdProp := f.Tag.Get(typeIriCompactTag) + if compactIdProp != "" { + tc.idProp = compactIdProp + } + } + m.iriToType[tc.iri] = tc + m.iriToType[tc.compact] = tc + m.typeToContext[t] = tc +} + +// appendErr appends errors, flattening joined errors +func appendErr(err error, errs ...error) error { + if joined, ok := err.(interface{ Unwrap() []error }); ok { + return errors.Join(append(joined.Unwrap(), errs...)...) + } + if err == nil { + return errors.Join(errs...) + } + return errors.Join(append([]error{err}, errs...)...) +} + +// baseType returns the base type if this is a pointer or interface +func baseType(t reflect.Type) reflect.Type { + switch t.Kind() { + case reflect.Pointer, reflect.Interface: + return baseType(t.Elem()) + default: + return t + } +} + +// isBlankNodeID indicates this is a blank node ID, e.g. _:CreationInfo-1 +func isBlankNodeID(val any) bool { + if val, ok := val.(string); ok { + return strings.HasPrefix(val, "_:") + } + return false +} + +type graphBuilder struct { + ldc ldContext + input []any + graph []any + idPrefix string + nextID map[reflect.Type]int + ids map[reflect.Value]string +} + +func (b *graphBuilder) toGraph() []any { + return b.graph +} + +func (b *graphBuilder) add(o any) (context *serializationContext, err error) { + v := reflect.ValueOf(o) + if v.Type().Kind() != reflect.Pointer { + if v.CanAddr() { + v = v.Addr() + } else { + newV := reflect.New(v.Type()) + newV.Elem().Set(v) + v = newV + } + } + val, err := b.toValue(v) + // objects with IDs get added to the graph during object traversal + if _, isTopLevel := val.(map[string]any); isTopLevel && err == nil { + b.graph = append(b.graph, val) + } + ctx := b.findContext(v.Type()) + return ctx, err +} + +func (b *graphBuilder) findContext(t reflect.Type) *serializationContext { + t = baseType(t) // object may be a pointer, but we want the base types + for _, context := range b.ldc { + for _, typ := range context.iriToType { + if t == typ.typ { + return context + } + } + } + return nil +} + +func (b *graphBuilder) toStructMap(v reflect.Value) (value any, err error) { + t := v.Type() + if t.Kind() != reflect.Struct { + return nil, fmt.Errorf("expected struct type, got: %v", stringify(v)) + } + + meta, ok := fieldByType[ldType](t) + if !ok { + return nil, fmt.Errorf("struct does not have LDType metadata: %v", stringify(v)) + } + + iri := meta.Tag.Get(typeIriCompactTag) + if iri == "" { + iri = meta.Tag.Get(typeIriTag) + } + + context := b.findContext(t) + tc := context.typeToContext[t] + + typeProp := ldTypeProp + if context.typeAlias != "" { + typeProp = context.typeAlias + } + out := map[string]any{ + typeProp: iri, + } + + hasValues := false + id := "" + + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if skipField(f) { + continue + } + + prop := f.Tag.Get(propIriCompactTag) + if prop == "" { + prop = f.Tag.Get(propIriTag) + } + + fieldV := v.Field(i) + + if !isRequired(f) && isEmpty(fieldV) { + continue + } + + val, err := b.toValue(fieldV) + if err != nil { + return nil, err + } + + if isIdField(f) { + id, _ = val.(string) + if id == "" { + // if this struct does not have an ID set, and does not have multiple references, + // it is output inline, it does not need an ID, but does need an ID + // when it is moved to the top-level graph and referenced elsewhere + if !b.hasMultipleReferences(v.Addr()) { + continue + } + val, _ = b.ensureID(v.Addr()) + } else if tc != nil { + // compact named IRIs + if _, ok := tc.iriToName[id]; ok { + id = tc.iriToName[id] + } + } + } else { + hasValues = true + } + + out[prop] = val + } + + if id != "" && !hasValues { + // if we _only_ have an ID set and no other values, consider this a named individual + return id, nil + } + + return out, nil +} + +func isIdField(f reflect.StructField) bool { + return f.Tag.Get(propIriTag) == ldIDProp +} + +func isEmpty(v reflect.Value) bool { + return !v.IsValid() || v.IsZero() +} + +func isRequired(f reflect.StructField) bool { + if isIdField(f) { + return true + } + required := f.Tag.Get(propIsRequiredTag) + return required != "" && !strings.EqualFold(required, "false") +} + +func (b *graphBuilder) toValue(v reflect.Value) (any, error) { + if !v.IsValid() { + return nil, nil + } + + switch v.Type().Kind() { + case reflect.Interface: + return b.toValue(v.Elem()) + case reflect.Pointer: + if v.IsNil() { + return nil, nil + } + if !b.hasMultipleReferences(v) { + return b.toValue(v.Elem()) + } + return b.ensureID(v) + case reflect.Struct: + return b.toStructMap(v) + case reflect.Slice: + var out []any + for i := 0; i < v.Len(); i++ { + val, err := b.toValue(v.Index(i)) + if err != nil { + return nil, err + } + out = append(out, val) + } + return out, nil + case reflect.String: + return v.String(), nil + default: + if v.CanInterface() { + return v.Interface(), nil + } + return nil, fmt.Errorf("unable to convert value to maps: %v", stringify(v)) + } +} + +func (b *graphBuilder) ensureID(ptr reflect.Value) (string, error) { + if ptr.Type().Kind() != reflect.Pointer { + return "", fmt.Errorf("expected pointer, got: %v", stringify(ptr)) + } + if id, ok := b.ids[ptr]; ok { + return id, nil + } + + v := ptr.Elem() + t := v.Type() + + id, err := b.getID(v) + if err != nil { + return "", err + } + if id == "" { + if b.nextID == nil { + b.nextID = map[reflect.Type]int{} + } + nextID := b.nextID[t] + 1 + b.nextID[t] = nextID + id = fmt.Sprintf("_:%s-%v", t.Name(), nextID) + } + b.ids[ptr] = id + val, err := b.toValue(v) + if err != nil { + return "", err + } + b.graph = append(b.graph, val) + return id, nil +} + +func (b *graphBuilder) getID(v reflect.Value) (string, error) { + t := v.Type() + if t.Kind() != reflect.Struct { + return "", fmt.Errorf("expected struct, got: %v", stringify(v)) + } + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if isIdField(f) { + fv := v.Field(i) + if f.Type.Kind() != reflect.String { + return "", fmt.Errorf("invalid type for ID field %v in: %v", f, stringify(v)) + } + return fv.String(), nil + } + } + return "", nil +} + +// hasMultipleReferences returns true if the ptr value has multiple references in the input slice +func (b *graphBuilder) hasMultipleReferences(ptr reflect.Value) bool { + if !ptr.IsValid() { + return false + } + count := 0 + visited := map[reflect.Value]struct{}{} + for _, v := range b.input { + count += refCountR(ptr, visited, reflect.ValueOf(v)) + if count > 1 { + return true + } + } + return false +} + +// refCount returns the reference count of the value in the container object +func refCount(find any, container any) int { + visited := map[reflect.Value]struct{}{} + ptrV := reflect.ValueOf(find) + if !ptrV.IsValid() { + return 0 + } + return refCountR(ptrV, visited, reflect.ValueOf(container)) +} + +// refCountR recursively searches for the value, find, in the value v +func refCountR(find reflect.Value, visited map[reflect.Value]struct{}, v reflect.Value) int { + if find.Equal(v) { + return 1 + } + if !v.IsValid() { + return 0 + } + if _, ok := visited[v]; ok { + return 0 + } + visited[v] = struct{}{} + switch v.Kind() { + case reflect.Interface: + return refCountR(find, visited, v.Elem()) + case reflect.Pointer: + if v.IsNil() { + return 0 + } + return refCountR(find, visited, v.Elem()) + case reflect.Struct: + count := 0 + for i := 0; i < v.NumField(); i++ { + count += refCountR(find, visited, v.Field(i)) + } + return count + case reflect.Slice: + count := 0 + for i := 0; i < v.Len(); i++ { + count += refCountR(find, visited, v.Index(i)) + } + return count + default: + return 0 + } +} + +func stringify(o any) string { + if v, ok := o.(reflect.Value); ok { + if !v.IsValid() { + return "invalid value" + } + if !v.IsZero() && v.CanInterface() { + o = v.Interface() + } + } + return fmt.Sprintf("%#v", o) +} + +type IEnergyConsumption interface { + + // GetFinetuningEnergyConsumption specifies the amount of energy consumed when finetuning the AI model that is + // being used in the AI system. + GetFinetuningEnergyConsumption() []IEnergyConsumptionDescription + + SetFinetuningEnergyConsumption(...IEnergyConsumptionDescription) + + // GetInferenceEnergyConsumption specifies the amount of energy consumed during inference time by an AI model + // that is being used in the AI system. + GetInferenceEnergyConsumption() []IEnergyConsumptionDescription + + SetInferenceEnergyConsumption(...IEnergyConsumptionDescription) + + // GetTrainingEnergyConsumption specifies the amount of energy consumed when training the AI model that is + // being used in the AI system. + GetTrainingEnergyConsumption() []IEnergyConsumptionDescription + + SetTrainingEnergyConsumption(...IEnergyConsumptionDescription) +} + +type EnergyConsumption struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/EnergyConsumption" iri-compact:"ai_EnergyConsumption"` + + Iri string `iri:"@id"` + + // FinetuningEnergyConsumption specifies the amount of energy consumed when finetuning the AI model that is + // being used in the AI system. + FinetuningEnergyConsumption []IEnergyConsumptionDescription `iri:"https://spdx.org/rdf/3.0.0/terms/AI/finetuningEnergyConsumption" iri-compact:"ai_finetuningEnergyConsumption"` + // InferenceEnergyConsumption specifies the amount of energy consumed during inference time by an AI model + // that is being used in the AI system. + InferenceEnergyConsumption []IEnergyConsumptionDescription `iri:"https://spdx.org/rdf/3.0.0/terms/AI/inferenceEnergyConsumption" iri-compact:"ai_inferenceEnergyConsumption"` + // TrainingEnergyConsumption specifies the amount of energy consumed when training the AI model that is + // being used in the AI system. + TrainingEnergyConsumption []IEnergyConsumptionDescription `iri:"https://spdx.org/rdf/3.0.0/terms/AI/trainingEnergyConsumption" iri-compact:"ai_trainingEnergyConsumption"` +} + +func NewEnergyConsumption() IEnergyConsumption { + return &EnergyConsumption{} +} + +func (o *EnergyConsumption) GetFinetuningEnergyConsumption() []IEnergyConsumptionDescription { + return o.FinetuningEnergyConsumption +} +func (o *EnergyConsumption) SetFinetuningEnergyConsumption(v ...IEnergyConsumptionDescription) { + o.FinetuningEnergyConsumption = v +} +func (o *EnergyConsumption) GetInferenceEnergyConsumption() []IEnergyConsumptionDescription { + return o.InferenceEnergyConsumption +} +func (o *EnergyConsumption) SetInferenceEnergyConsumption(v ...IEnergyConsumptionDescription) { + o.InferenceEnergyConsumption = v +} +func (o *EnergyConsumption) GetTrainingEnergyConsumption() []IEnergyConsumptionDescription { + return o.TrainingEnergyConsumption +} +func (o *EnergyConsumption) SetTrainingEnergyConsumption(v ...IEnergyConsumptionDescription) { + o.TrainingEnergyConsumption = v +} + +type IEnergyConsumptionDescription interface { + + // GetEnergyQuantity represents the energy quantity. + GetEnergyQuantity() float64 + + SetEnergyQuantity(float64) + + // GetEnergyUnit specifies the unit in which energy is measured. + GetEnergyUnit() EnergyUnitType + + SetEnergyUnit(EnergyUnitType) +} + +type EnergyConsumptionDescription struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/EnergyConsumptionDescription" iri-compact:"ai_EnergyConsumptionDescription"` + + Iri string `iri:"@id"` + + // EnergyQuantity represents the energy quantity. + EnergyQuantity float64 `iri:"https://spdx.org/rdf/3.0.0/terms/AI/energyQuantity" iri-compact:"ai_energyQuantity"` + // EnergyUnit specifies the unit in which energy is measured. + EnergyUnit EnergyUnitType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/energyUnit" iri-compact:"ai_energyUnit"` +} + +func NewEnergyConsumptionDescription() IEnergyConsumptionDescription { + return &EnergyConsumptionDescription{} +} + +func (o *EnergyConsumptionDescription) GetEnergyQuantity() float64 { + return o.EnergyQuantity +} +func (o *EnergyConsumptionDescription) SetEnergyQuantity(v float64) { + o.EnergyQuantity = v +} +func (o *EnergyConsumptionDescription) GetEnergyUnit() EnergyUnitType { + return o.EnergyUnit +} +func (o *EnergyConsumptionDescription) SetEnergyUnit(v EnergyUnitType) { + o.EnergyUnit = v +} + +type EnergyUnitType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType" iri-compact:"ai_EnergyUnitType"` + + Iri string `iri:"@id"` +} + +var ( + EnergyUnitType_KilowattHour = EnergyUnitType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/kilowattHour"} + EnergyUnitType_Megajoule = EnergyUnitType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/megajoule"} + EnergyUnitType_Other = EnergyUnitType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/other"} +) + +type SafetyRiskAssessmentType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType" iri-compact:"ai_SafetyRiskAssessmentType"` + + Iri string `iri:"@id"` +} + +var ( + SafetyRiskAssessmentType_High = SafetyRiskAssessmentType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/high"} + SafetyRiskAssessmentType_Low = SafetyRiskAssessmentType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/low"} + SafetyRiskAssessmentType_Medium = SafetyRiskAssessmentType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/medium"} + SafetyRiskAssessmentType_Serious = SafetyRiskAssessmentType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/serious"} +) + +type AnnotationType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/AnnotationType" iri-compact:"AnnotationType"` + + Iri string `iri:"@id"` +} + +var ( + AnnotationType_Other = AnnotationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/AnnotationType/other"} + AnnotationType_Review = AnnotationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/AnnotationType/review"} +) + +type ICreationInfo interface { + + // GetComment provide consumers with comments by the creator of the Element about the + // Element. + GetComment() string + + SetComment(string) + + // GetCreated identifies when the Element was originally created. + GetCreated() string + + SetCreated(string) + + // GetCreatedBy identifies who or what created the Element. + GetCreatedBy() []IAgent + + SetCreatedBy(...IAgent) + + // GetCreatedUsing identifies the tooling that was used during the creation of the Element. + GetCreatedUsing() []ITool + + SetCreatedUsing(...ITool) + + // GetSpecVersion provides a reference number that can be used to understand how to parse and interpret an Element. + GetSpecVersion() string + + SetSpecVersion(string) +} + +type CreationInfo struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/CreationInfo" iri-compact:"CreationInfo"` + + Iri string `iri:"@id"` + + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // Created identifies when the Element was originally created. + Created string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/created" iri-compact:"created"` + // CreatedBy identifies who or what created the Element. + CreatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/createdBy" iri-compact:"createdBy"` + // CreatedUsing identifies the tooling that was used during the creation of the Element. + CreatedUsing []ITool `iri:"https://spdx.org/rdf/3.0.0/terms/Core/createdUsing" iri-compact:"createdUsing"` + // SpecVersion provides a reference number that can be used to understand how to parse and interpret an Element. + SpecVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/specVersion" iri-compact:"specVersion"` +} + +func NewCreationInfo() ICreationInfo { + return &CreationInfo{} +} + +func (o *CreationInfo) GetComment() string { + return o.Comment +} +func (o *CreationInfo) SetComment(v string) { + o.Comment = v +} +func (o *CreationInfo) GetCreated() string { + return o.Created +} +func (o *CreationInfo) SetCreated(v string) { + o.Created = v +} +func (o *CreationInfo) GetCreatedBy() []IAgent { + return o.CreatedBy +} +func (o *CreationInfo) SetCreatedBy(v ...IAgent) { + o.CreatedBy = v +} +func (o *CreationInfo) GetCreatedUsing() []ITool { + return o.CreatedUsing +} +func (o *CreationInfo) SetCreatedUsing(v ...ITool) { + o.CreatedUsing = v +} +func (o *CreationInfo) GetSpecVersion() string { + return o.SpecVersion +} +func (o *CreationInfo) SetSpecVersion(v string) { + o.SpecVersion = v +} + +type IDictionaryEntry interface { + + // GetKey a key used in a generic key-value pair. + GetKey() string + + SetKey(string) + + // GetValue a value used in a generic key-value pair. + GetValue() string + + SetValue(string) +} + +type DictionaryEntry struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/DictionaryEntry" iri-compact:"DictionaryEntry"` + + Iri string `iri:"@id"` + + // Key a key used in a generic key-value pair. + Key string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/key" iri-compact:"key"` + // Value a value used in a generic key-value pair. + Value string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/value" iri-compact:"value"` +} + +func NewDictionaryEntry() IDictionaryEntry { + return &DictionaryEntry{} +} + +func (o *DictionaryEntry) GetKey() string { + return o.Key +} +func (o *DictionaryEntry) SetKey(v string) { + o.Key = v +} +func (o *DictionaryEntry) GetValue() string { + return o.Value +} +func (o *DictionaryEntry) SetValue(v string) { + o.Value = v +} + +type IElement interface { + + // GetSpdxId identifier property + GetSpdxId() string + + SetSpdxId(string) + + // GetComment provide consumers with comments by the creator of the Element about the + // Element. + GetComment() string + + SetComment(string) + + // GetCreationInfo provides information about the creation of the Element. + GetCreationInfo() ICreationInfo + + SetCreationInfo(ICreationInfo) + + // GetDescription provides a detailed description of the Element. + GetDescription() string + + SetDescription(string) + + // GetExtensions specifies an Extension characterization of some aspect of an Element. + GetExtensions() []IExtension + + SetExtensions(...IExtension) + + // GetExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + GetExternalIdentifiers() []IExternalIdentifier + + SetExternalIdentifiers(...IExternalIdentifier) + + // GetExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + GetExternalRefs() []IExternalRef + + SetExternalRefs(...IExternalRef) + + // GetName identifies the name of an Element as designated by the creator. + GetName() string + + SetName(string) + + // GetSummary a short description of an Element. + GetSummary() string + + SetSummary(string) + + // GetVerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + GetVerifiedUsing() []IIntegrityMethod + + SetVerifiedUsing(...IIntegrityMethod) +} + +type Element struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Element" iri-compact:"Element" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +} + +func (o *Element) GetSpdxId() string { + return o.SpdxId +} +func (o *Element) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Element) GetComment() string { + return o.Comment +} +func (o *Element) SetComment(v string) { + o.Comment = v +} +func (o *Element) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Element) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Element) GetDescription() string { + return o.Description +} +func (o *Element) SetDescription(v string) { + o.Description = v +} +func (o *Element) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Element) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Element) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Element) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Element) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Element) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Element) GetName() string { + return o.Name +} +func (o *Element) SetName(v string) { + o.Name = v +} +func (o *Element) GetSummary() string { + return o.Summary +} +func (o *Element) SetSummary(v string) { + o.Summary = v +} +func (o *Element) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Element) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +type IElementCollection interface { + IElement + + // GetElements refers to one or more Elements that are part of an ElementCollection. + GetElements() []IElement + + SetElements(...IElement) + + // GetProfileConformance describes one a profile which the creator of this ElementCollection intends to + // conform to. + GetProfileConformance() []ProfileIdentifierType + + SetProfileConformance(...ProfileIdentifierType) + + // GetRootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. + GetRootElements() []IElement + + SetRootElements(...IElement) +} + +type ElementCollection struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ElementCollection" iri-compact:"ElementCollection" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Elements refers to one or more Elements that are part of an ElementCollection. + Elements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/element" iri-compact:"element"` + // ProfileConformance describes one a profile which the creator of this ElementCollection intends to + // conform to. + ProfileConformance []ProfileIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/profileConformance" iri-compact:"profileConformance"` + // RootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. + RootElements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/rootElement" iri-compact:"rootElement"` +} + +func (o *ElementCollection) GetSpdxId() string { + return o.SpdxId +} +func (o *ElementCollection) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *ElementCollection) GetComment() string { + return o.Comment +} +func (o *ElementCollection) SetComment(v string) { + o.Comment = v +} +func (o *ElementCollection) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *ElementCollection) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *ElementCollection) GetDescription() string { + return o.Description +} +func (o *ElementCollection) SetDescription(v string) { + o.Description = v +} +func (o *ElementCollection) GetExtensions() []IExtension { + return o.Extensions +} +func (o *ElementCollection) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *ElementCollection) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *ElementCollection) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *ElementCollection) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *ElementCollection) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *ElementCollection) GetName() string { + return o.Name +} +func (o *ElementCollection) SetName(v string) { + o.Name = v +} +func (o *ElementCollection) GetSummary() string { + return o.Summary +} +func (o *ElementCollection) SetSummary(v string) { + o.Summary = v +} +func (o *ElementCollection) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *ElementCollection) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *ElementCollection) GetElements() []IElement { + return o.Elements +} +func (o *ElementCollection) SetElements(v ...IElement) { + o.Elements = v +} +func (o *ElementCollection) GetProfileConformance() []ProfileIdentifierType { + return o.ProfileConformance +} +func (o *ElementCollection) SetProfileConformance(v ...ProfileIdentifierType) { + o.ProfileConformance = v +} +func (o *ElementCollection) GetRootElements() []IElement { + return o.RootElements +} +func (o *ElementCollection) SetRootElements(v ...IElement) { + o.RootElements = v +} + +type IExternalIdentifier interface { + + // GetComment provide consumers with comments by the creator of the Element about the + // Element. + GetComment() string + + SetComment(string) + + // GetExternalIdentifierType specifies the type of the external identifier. + GetExternalIdentifierType() ExternalIdentifierType + + SetExternalIdentifierType(ExternalIdentifierType) + + // GetIdentifier uniquely identifies an external element. + GetIdentifier() string + + SetIdentifier(string) + + // GetIdentifierLocator provides the location for more information regarding an external identifier. + GetIdentifierLocator() []string + + SetIdentifierLocator(...string) + + // GetIssuingAuthority an entity that is authorized to issue identification credentials. + GetIssuingAuthority() string + + SetIssuingAuthority(string) +} + +type ExternalIdentifier struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifier" iri-compact:"ExternalIdentifier"` + + Iri string `iri:"@id"` + + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // ExternalIdentifierType specifies the type of the external identifier. + ExternalIdentifierType ExternalIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifierType" iri-compact:"externalIdentifierType"` + // Identifier uniquely identifies an external element. + Identifier string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/identifier" iri-compact:"identifier"` + // IdentifierLocator provides the location for more information regarding an external identifier. + IdentifierLocator []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/identifierLocator" iri-compact:"identifierLocator"` + // IssuingAuthority an entity that is authorized to issue identification credentials. + IssuingAuthority string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/issuingAuthority" iri-compact:"issuingAuthority"` +} + +func NewExternalIdentifier() IExternalIdentifier { + return &ExternalIdentifier{} +} + +func (o *ExternalIdentifier) GetComment() string { + return o.Comment +} +func (o *ExternalIdentifier) SetComment(v string) { + o.Comment = v +} +func (o *ExternalIdentifier) GetExternalIdentifierType() ExternalIdentifierType { + return o.ExternalIdentifierType +} +func (o *ExternalIdentifier) SetExternalIdentifierType(v ExternalIdentifierType) { + o.ExternalIdentifierType = v +} +func (o *ExternalIdentifier) GetIdentifier() string { + return o.Identifier +} +func (o *ExternalIdentifier) SetIdentifier(v string) { + o.Identifier = v +} +func (o *ExternalIdentifier) GetIdentifierLocator() []string { + return o.IdentifierLocator +} +func (o *ExternalIdentifier) SetIdentifierLocator(v ...string) { + o.IdentifierLocator = v +} +func (o *ExternalIdentifier) GetIssuingAuthority() string { + return o.IssuingAuthority +} +func (o *ExternalIdentifier) SetIssuingAuthority(v string) { + o.IssuingAuthority = v +} + +type ExternalIdentifierType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType" iri-compact:"ExternalIdentifierType"` + + Iri string `iri:"@id"` +} + +var ( + ExternalIdentifierType_Cpe22 = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cpe22"} + ExternalIdentifierType_Cpe23 = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cpe23"} + ExternalIdentifierType_Cve = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cve"} + ExternalIdentifierType_Email = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/email"} + ExternalIdentifierType_Gitoid = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/gitoid"} + ExternalIdentifierType_Other = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/other"} + ExternalIdentifierType_PackageUrl = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/packageUrl"} + ExternalIdentifierType_SecurityOther = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/securityOther"} + ExternalIdentifierType_Swhid = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/swhid"} + ExternalIdentifierType_Swid = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/swid"} + ExternalIdentifierType_UrlScheme = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/urlScheme"} +) + +type IExternalMap interface { + + // GetDefiningArtifact artifact representing a serialization instance of SPDX data containing the + // definition of a particular Element. + GetDefiningArtifact() IArtifact + + SetDefiningArtifact(IArtifact) + + // GetExternalSpdxId identifies an external Element used within a Document but defined external to + // that Document. + GetExternalSpdxId() string + + SetExternalSpdxId(string) + + // GetLocationHint provides an indication of where to retrieve an external Element. + GetLocationHint() string + + SetLocationHint(string) + + // GetVerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + GetVerifiedUsing() []IIntegrityMethod + + SetVerifiedUsing(...IIntegrityMethod) +} + +type ExternalMap struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ExternalMap" iri-compact:"ExternalMap"` + + Iri string `iri:"@id"` + + // DefiningArtifact artifact representing a serialization instance of SPDX data containing the + // definition of a particular Element. + DefiningArtifact IArtifact `iri:"https://spdx.org/rdf/3.0.0/terms/Core/definingArtifact" iri-compact:"definingArtifact"` + // ExternalSpdxId identifies an external Element used within a Document but defined external to + // that Document. + ExternalSpdxId string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalSpdxId" iri-compact:"externalSpdxId"` + // LocationHint provides an indication of where to retrieve an external Element. + LocationHint string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/locationHint" iri-compact:"locationHint"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +} + +func NewExternalMap() IExternalMap { + return &ExternalMap{} +} + +func (o *ExternalMap) GetDefiningArtifact() IArtifact { + return o.DefiningArtifact +} +func (o *ExternalMap) SetDefiningArtifact(v IArtifact) { + o.DefiningArtifact = v +} +func (o *ExternalMap) GetExternalSpdxId() string { + return o.ExternalSpdxId +} +func (o *ExternalMap) SetExternalSpdxId(v string) { + o.ExternalSpdxId = v +} +func (o *ExternalMap) GetLocationHint() string { + return o.LocationHint +} +func (o *ExternalMap) SetLocationHint(v string) { + o.LocationHint = v +} +func (o *ExternalMap) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *ExternalMap) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +type IExternalRef interface { + + // GetComment provide consumers with comments by the creator of the Element about the + // Element. + GetComment() string + + SetComment(string) + + // GetContentType specifies the media type of an Element or Property. + GetContentType() string + + SetContentType(string) + + // GetExternalRefType specifies the type of the external reference. + GetExternalRefType() ExternalRefType + + SetExternalRefType(ExternalRefType) + + // GetLocator provides the location of an external reference. + GetLocator() []string + + SetLocator(...string) +} + +type ExternalRef struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ExternalRef" iri-compact:"ExternalRef"` + + Iri string `iri:"@id"` + + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // ContentType specifies the media type of an Element or Property. + ContentType string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/contentType" iri-compact:"contentType"` + // ExternalRefType specifies the type of the external reference. + ExternalRefType ExternalRefType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRefType" iri-compact:"externalRefType"` + // Locator provides the location of an external reference. + Locator []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/locator" iri-compact:"locator"` +} + +func NewExternalRef() IExternalRef { + return &ExternalRef{} +} + +func (o *ExternalRef) GetComment() string { + return o.Comment +} +func (o *ExternalRef) SetComment(v string) { + o.Comment = v +} +func (o *ExternalRef) GetContentType() string { + return o.ContentType +} +func (o *ExternalRef) SetContentType(v string) { + o.ContentType = v +} +func (o *ExternalRef) GetExternalRefType() ExternalRefType { + return o.ExternalRefType +} +func (o *ExternalRef) SetExternalRefType(v ExternalRefType) { + o.ExternalRefType = v +} +func (o *ExternalRef) GetLocator() []string { + return o.Locator +} +func (o *ExternalRef) SetLocator(v ...string) { + o.Locator = v +} + +type ExternalRefType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType" iri-compact:"ExternalRefType"` + + Iri string `iri:"@id"` +} + +var ( + ExternalRefType_AltDownloadLocation = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/altDownloadLocation"} + ExternalRefType_AltWebPage = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/altWebPage"} + ExternalRefType_BinaryArtifact = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/binaryArtifact"} + ExternalRefType_Bower = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/bower"} + ExternalRefType_BuildMeta = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/buildMeta"} + ExternalRefType_BuildSystem = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/buildSystem"} + ExternalRefType_CertificationReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/certificationReport"} + ExternalRefType_Chat = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/chat"} + ExternalRefType_ComponentAnalysisReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/componentAnalysisReport"} + ExternalRefType_Cwe = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/cwe"} + ExternalRefType_Documentation = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/documentation"} + ExternalRefType_DynamicAnalysisReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/dynamicAnalysisReport"} + ExternalRefType_EolNotice = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/eolNotice"} + ExternalRefType_ExportControlAssessment = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/exportControlAssessment"} + ExternalRefType_Funding = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/funding"} + ExternalRefType_IssueTracker = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/issueTracker"} + ExternalRefType_License = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/license"} + ExternalRefType_MailingList = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/mailingList"} + ExternalRefType_MavenCentral = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/mavenCentral"} + ExternalRefType_Metrics = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/metrics"} + ExternalRefType_Npm = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/npm"} + ExternalRefType_Nuget = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/nuget"} + ExternalRefType_Other = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/other"} + ExternalRefType_PrivacyAssessment = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/privacyAssessment"} + ExternalRefType_ProductMetadata = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/productMetadata"} + ExternalRefType_PurchaseOrder = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/purchaseOrder"} + ExternalRefType_QualityAssessmentReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/qualityAssessmentReport"} + ExternalRefType_ReleaseHistory = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/releaseHistory"} + ExternalRefType_ReleaseNotes = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/releaseNotes"} + ExternalRefType_RiskAssessment = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/riskAssessment"} + ExternalRefType_RuntimeAnalysisReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/runtimeAnalysisReport"} + ExternalRefType_SecureSoftwareAttestation = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/secureSoftwareAttestation"} + ExternalRefType_SecurityAdversaryModel = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityAdversaryModel"} + ExternalRefType_SecurityAdvisory = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityAdvisory"} + ExternalRefType_SecurityFix = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityFix"} + ExternalRefType_SecurityOther = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityOther"} + ExternalRefType_SecurityPenTestReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityPenTestReport"} + ExternalRefType_SecurityPolicy = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityPolicy"} + ExternalRefType_SecurityThreatModel = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityThreatModel"} + ExternalRefType_SocialMedia = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/socialMedia"} + ExternalRefType_SourceArtifact = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/sourceArtifact"} + ExternalRefType_StaticAnalysisReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/staticAnalysisReport"} + ExternalRefType_Support = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/support"} + ExternalRefType_Vcs = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vcs"} + ExternalRefType_VulnerabilityDisclosureReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vulnerabilityDisclosureReport"} + ExternalRefType_VulnerabilityExploitabilityAssessment = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vulnerabilityExploitabilityAssessment"} +) + +type HashAlgorithm struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm" iri-compact:"HashAlgorithm"` + + Iri string `iri:"@id"` +} + +var ( + HashAlgorithm_Blake2b256 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b256"} + HashAlgorithm_Blake2b384 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b384"} + HashAlgorithm_Blake2b512 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b512"} + HashAlgorithm_Blake3 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake3"} + HashAlgorithm_CrystalsDilithium = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsDilithium"} + HashAlgorithm_CrystalsKyber = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsKyber"} + HashAlgorithm_Falcon = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/falcon"} + HashAlgorithm_Md2 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md2"} + HashAlgorithm_Md4 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md4"} + HashAlgorithm_Md5 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md5"} + HashAlgorithm_Md6 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md6"} + HashAlgorithm_Other = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/other"} + HashAlgorithm_Sha1 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha1"} + HashAlgorithm_Sha224 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha224"} + HashAlgorithm_Sha256 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha256"} + HashAlgorithm_Sha384 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha384"} + HashAlgorithm_Sha3_224 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_224"} + HashAlgorithm_Sha3_256 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_256"} + HashAlgorithm_Sha3_384 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_384"} + HashAlgorithm_Sha3_512 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_512"} + HashAlgorithm_Sha512 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha512"} +) + +type IIntegrityMethod interface { + + // GetComment provide consumers with comments by the creator of the Element about the + // Element. + GetComment() string + + SetComment(string) +} + +type IntegrityMethod struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/IntegrityMethod" iri-compact:"IntegrityMethod"` + + Iri string `iri:"@id"` + + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` +} + +func (o *IntegrityMethod) GetComment() string { + return o.Comment +} +func (o *IntegrityMethod) SetComment(v string) { + o.Comment = v +} + +type LifecycleScopeType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType" iri-compact:"LifecycleScopeType"` + + Iri string `iri:"@id"` +} + +var ( + LifecycleScopeType_Build = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/build"} + LifecycleScopeType_Design = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/design"} + LifecycleScopeType_Development = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/development"} + LifecycleScopeType_Other = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/other"} + LifecycleScopeType_Runtime = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/runtime"} + LifecycleScopeType_Test = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/test"} +) + +type INamespaceMap interface { + + // GetNamespace provides an unambiguous mechanism for conveying a URI fragment portion of an + // ElementID. + GetNamespace() string + + SetNamespace(string) + + // GetPrefix a substitute for a URI. + GetPrefix() string + + SetPrefix(string) +} + +type NamespaceMap struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/NamespaceMap" iri-compact:"NamespaceMap"` + + Iri string `iri:"@id"` + + // Namespace provides an unambiguous mechanism for conveying a URI fragment portion of an + // ElementID. + Namespace string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/namespace" iri-compact:"namespace"` + // Prefix a substitute for a URI. + Prefix string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/prefix" iri-compact:"prefix"` +} + +func NewNamespaceMap() INamespaceMap { + return &NamespaceMap{} +} + +func (o *NamespaceMap) GetNamespace() string { + return o.Namespace +} +func (o *NamespaceMap) SetNamespace(v string) { + o.Namespace = v +} +func (o *NamespaceMap) GetPrefix() string { + return o.Prefix +} +func (o *NamespaceMap) SetPrefix(v string) { + o.Prefix = v +} + +type IPackageVerificationCode interface { + IIntegrityMethod + + // GetAlgorithm specifies the algorithm used for calculating the hash value. + GetAlgorithm() HashAlgorithm + + SetAlgorithm(HashAlgorithm) + + // GetHashValue the result of applying a hash algorithm to an Element. + GetHashValue() string + + SetHashValue(string) + + // GetPackageVerificationCodeExcludedFile the relative file name of a file to be excluded from the + // `PackageVerificationCode`. + GetPackageVerificationCodeExcludedFile() []string + + SetPackageVerificationCodeExcludedFile(...string) +} + +type PackageVerificationCode struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/PackageVerificationCode" iri-compact:"PackageVerificationCode"` + + Iri string `iri:"@id"` + + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + + // Algorithm specifies the algorithm used for calculating the hash value. + Algorithm HashAlgorithm `iri:"https://spdx.org/rdf/3.0.0/terms/Core/algorithm" iri-compact:"algorithm"` + // HashValue the result of applying a hash algorithm to an Element. + HashValue string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/hashValue" iri-compact:"hashValue"` + // PackageVerificationCodeExcludedFile the relative file name of a file to be excluded from the + // `PackageVerificationCode`. + PackageVerificationCodeExcludedFile []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/packageVerificationCodeExcludedFile" iri-compact:"packageVerificationCodeExcludedFile"` +} + +func NewPackageVerificationCode() IPackageVerificationCode { + return &PackageVerificationCode{} +} + +func (o *PackageVerificationCode) GetComment() string { + return o.Comment +} +func (o *PackageVerificationCode) SetComment(v string) { + o.Comment = v +} + +func (o *PackageVerificationCode) GetAlgorithm() HashAlgorithm { + return o.Algorithm +} +func (o *PackageVerificationCode) SetAlgorithm(v HashAlgorithm) { + o.Algorithm = v +} +func (o *PackageVerificationCode) GetHashValue() string { + return o.HashValue +} +func (o *PackageVerificationCode) SetHashValue(v string) { + o.HashValue = v +} +func (o *PackageVerificationCode) GetPackageVerificationCodeExcludedFile() []string { + return o.PackageVerificationCodeExcludedFile +} +func (o *PackageVerificationCode) SetPackageVerificationCodeExcludedFile(v ...string) { + o.PackageVerificationCodeExcludedFile = v +} + +type IPositiveIntegerRange interface { + + // GetBeginIntegerRange defines the beginning of a range. + GetBeginIntegerRange() uint + + SetBeginIntegerRange(uint) + + // GetEndIntegerRange defines the end of a range. + GetEndIntegerRange() uint + + SetEndIntegerRange(uint) +} + +type PositiveIntegerRange struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/PositiveIntegerRange" iri-compact:"PositiveIntegerRange"` + + Iri string `iri:"@id"` + + // BeginIntegerRange defines the beginning of a range. + BeginIntegerRange uint `iri:"https://spdx.org/rdf/3.0.0/terms/Core/beginIntegerRange" iri-compact:"beginIntegerRange"` + // EndIntegerRange defines the end of a range. + EndIntegerRange uint `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endIntegerRange" iri-compact:"endIntegerRange"` +} + +func NewPositiveIntegerRange() IPositiveIntegerRange { + return &PositiveIntegerRange{} +} + +func (o *PositiveIntegerRange) GetBeginIntegerRange() uint { + return o.BeginIntegerRange +} +func (o *PositiveIntegerRange) SetBeginIntegerRange(v uint) { + o.BeginIntegerRange = v +} +func (o *PositiveIntegerRange) GetEndIntegerRange() uint { + return o.EndIntegerRange +} +func (o *PositiveIntegerRange) SetEndIntegerRange(v uint) { + o.EndIntegerRange = v +} + +type PresenceType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/PresenceType" iri-compact:"PresenceType"` + + Iri string `iri:"@id"` +} + +var ( + PresenceType_No = PresenceType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/no"} + PresenceType_NoAssertion = PresenceType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/noAssertion"} + PresenceType_Yes = PresenceType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/yes"} +) + +type ProfileIdentifierType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType" iri-compact:"ProfileIdentifierType"` + + Iri string `iri:"@id"` +} + +var ( + ProfileIdentifierType_Ai = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/ai"} + ProfileIdentifierType_Build = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/build"} + ProfileIdentifierType_Core = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/core"} + ProfileIdentifierType_Dataset = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/dataset"} + ProfileIdentifierType_ExpandedLicensing = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/expandedLicensing"} + ProfileIdentifierType_Extension = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/extension"} + ProfileIdentifierType_Lite = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/lite"} + ProfileIdentifierType_Security = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/security"} + ProfileIdentifierType_SimpleLicensing = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/simpleLicensing"} + ProfileIdentifierType_Software = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/software"} +) + +type IRelationship interface { + IElement + + // GetCompleteness provides information about the completeness of relationships. + GetCompleteness() RelationshipCompleteness + + SetCompleteness(RelationshipCompleteness) + + // GetEndTime specifies the time from which an element is no longer applicable / valid. + GetEndTime() string + + SetEndTime(string) + + // GetFrom references the Element on the left-hand side of a relationship. + GetFrom() IElement + + SetFrom(IElement) + + // GetRelationshipType information about the relationship between two Elements. + GetRelationshipType() RelationshipType + + SetRelationshipType(RelationshipType) + + // GetStartTime specifies the time from which an element is applicable / valid. + GetStartTime() string + + SetStartTime(string) + + // GetTo references an Element on the right-hand side of a relationship. + GetTo() []IElement + + SetTo(...IElement) +} + +type Relationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Relationship" iri-compact:"Relationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` +} + +func NewRelationship() IRelationship { + return &Relationship{} +} + +func (o *Relationship) GetSpdxId() string { + return o.SpdxId +} +func (o *Relationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Relationship) GetComment() string { + return o.Comment +} +func (o *Relationship) SetComment(v string) { + o.Comment = v +} +func (o *Relationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Relationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Relationship) GetDescription() string { + return o.Description +} +func (o *Relationship) SetDescription(v string) { + o.Description = v +} +func (o *Relationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Relationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Relationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Relationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Relationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Relationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Relationship) GetName() string { + return o.Name +} +func (o *Relationship) SetName(v string) { + o.Name = v +} +func (o *Relationship) GetSummary() string { + return o.Summary +} +func (o *Relationship) SetSummary(v string) { + o.Summary = v +} +func (o *Relationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Relationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *Relationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *Relationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *Relationship) GetEndTime() string { + return o.EndTime +} +func (o *Relationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *Relationship) GetFrom() IElement { + return o.From +} +func (o *Relationship) SetFrom(v IElement) { + o.From = v +} +func (o *Relationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *Relationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *Relationship) GetStartTime() string { + return o.StartTime +} +func (o *Relationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *Relationship) GetTo() []IElement { + return o.To +} +func (o *Relationship) SetTo(v ...IElement) { + o.To = v +} + +type RelationshipCompleteness struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness" iri-compact:"RelationshipCompleteness"` + + Iri string `iri:"@id"` +} + +var ( + RelationshipCompleteness_Complete = RelationshipCompleteness{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/complete"} + RelationshipCompleteness_Incomplete = RelationshipCompleteness{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/incomplete"} + RelationshipCompleteness_NoAssertion = RelationshipCompleteness{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/noAssertion"} +) + +type RelationshipType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType" iri-compact:"RelationshipType"` + + Iri string `iri:"@id"` +} + +var ( + RelationshipType_Affects = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/affects"} + RelationshipType_AmendedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/amendedBy"} + RelationshipType_AncestorOf = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/ancestorOf"} + RelationshipType_AvailableFrom = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/availableFrom"} + RelationshipType_Configures = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/configures"} + RelationshipType_Contains = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/contains"} + RelationshipType_CoordinatedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/coordinatedBy"} + RelationshipType_CopiedTo = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/copiedTo"} + RelationshipType_DelegatedTo = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/delegatedTo"} + RelationshipType_DependsOn = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/dependsOn"} + RelationshipType_DescendantOf = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/descendantOf"} + RelationshipType_Describes = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/describes"} + RelationshipType_DoesNotAffect = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/doesNotAffect"} + RelationshipType_ExpandsTo = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/expandsTo"} + RelationshipType_ExploitCreatedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/exploitCreatedBy"} + RelationshipType_FixedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/fixedBy"} + RelationshipType_FixedIn = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/fixedIn"} + RelationshipType_FoundBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/foundBy"} + RelationshipType_Generates = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/generates"} + RelationshipType_HasAddedFile = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAddedFile"} + RelationshipType_HasAssessmentFor = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAssessmentFor"} + RelationshipType_HasAssociatedVulnerability = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAssociatedVulnerability"} + RelationshipType_HasConcludedLicense = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasConcludedLicense"} + RelationshipType_HasDataFile = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDataFile"} + RelationshipType_HasDeclaredLicense = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDeclaredLicense"} + RelationshipType_HasDeletedFile = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDeletedFile"} + RelationshipType_HasDependencyManifest = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDependencyManifest"} + RelationshipType_HasDistributionArtifact = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDistributionArtifact"} + RelationshipType_HasDocumentation = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDocumentation"} + RelationshipType_HasDynamicLink = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDynamicLink"} + RelationshipType_HasEvidence = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasEvidence"} + RelationshipType_HasExample = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasExample"} + RelationshipType_HasHost = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasHost"} + RelationshipType_HasInputs = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasInputs"} + RelationshipType_HasMetadata = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasMetadata"} + RelationshipType_HasOptionalComponent = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOptionalComponent"} + RelationshipType_HasOptionalDependency = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOptionalDependency"} + RelationshipType_HasOutputs = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOutputs"} + RelationshipType_HasPrerequsite = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasPrerequsite"} + RelationshipType_HasProvidedDependency = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasProvidedDependency"} + RelationshipType_HasRequirement = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasRequirement"} + RelationshipType_HasSpecification = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasSpecification"} + RelationshipType_HasStaticLink = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasStaticLink"} + RelationshipType_HasTest = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasTest"} + RelationshipType_HasTestCase = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasTestCase"} + RelationshipType_HasVariant = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasVariant"} + RelationshipType_InvokedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/invokedBy"} + RelationshipType_ModifiedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/modifiedBy"} + RelationshipType_Other = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/other"} + RelationshipType_PackagedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/packagedBy"} + RelationshipType_PatchedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/patchedBy"} + RelationshipType_PublishedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/publishedBy"} + RelationshipType_ReportedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/reportedBy"} + RelationshipType_RepublishedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/republishedBy"} + RelationshipType_SerializedInArtifact = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/serializedInArtifact"} + RelationshipType_TestedOn = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/testedOn"} + RelationshipType_TrainedOn = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/trainedOn"} + RelationshipType_UnderInvestigationFor = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/underInvestigationFor"} + RelationshipType_UsesTool = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/usesTool"} +) + +type ISpdxDocument interface { + IElementCollection + + // GetDataLicense provides the license under which the SPDX documentation of the Element can be + // used. + GetDataLicense() IAnyLicenseInfo + + SetDataLicense(IAnyLicenseInfo) + + // GetImports provides an ExternalMap of Element identifiers. + GetImports() []IExternalMap + + SetImports(...IExternalMap) + + // GetNamespaceMap provides a NamespaceMap of prefixes and associated namespace partial URIs applicable to an SpdxDocument and independent of any specific serialization format or instance. + GetNamespaceMap() []INamespaceMap + + SetNamespaceMap(...INamespaceMap) +} + +type SpdxDocument struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/SpdxDocument" iri-compact:"SpdxDocument" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Elements refers to one or more Elements that are part of an ElementCollection. + Elements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/element" iri-compact:"element"` + // ProfileConformance describes one a profile which the creator of this ElementCollection intends to + // conform to. + ProfileConformance []ProfileIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/profileConformance" iri-compact:"profileConformance"` + // RootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. + RootElements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/rootElement" iri-compact:"rootElement"` + + // DataLicense provides the license under which the SPDX documentation of the Element can be + // used. + DataLicense IAnyLicenseInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/dataLicense" iri-compact:"dataLicense"` + // Imports provides an ExternalMap of Element identifiers. + Imports []IExternalMap `iri:"https://spdx.org/rdf/3.0.0/terms/Core/imports" iri-compact:"imports"` + // NamespaceMap provides a NamespaceMap of prefixes and associated namespace partial URIs applicable to an SpdxDocument and independent of any specific serialization format or instance. + NamespaceMap []INamespaceMap `iri:"https://spdx.org/rdf/3.0.0/terms/Core/namespaceMap" iri-compact:"namespaceMap"` +} + +func NewSpdxDocument() ISpdxDocument { + return &SpdxDocument{} +} + +func (o *SpdxDocument) GetSpdxId() string { + return o.SpdxId +} +func (o *SpdxDocument) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *SpdxDocument) GetComment() string { + return o.Comment +} +func (o *SpdxDocument) SetComment(v string) { + o.Comment = v +} +func (o *SpdxDocument) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *SpdxDocument) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *SpdxDocument) GetDescription() string { + return o.Description +} +func (o *SpdxDocument) SetDescription(v string) { + o.Description = v +} +func (o *SpdxDocument) GetExtensions() []IExtension { + return o.Extensions +} +func (o *SpdxDocument) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *SpdxDocument) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *SpdxDocument) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *SpdxDocument) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *SpdxDocument) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *SpdxDocument) GetName() string { + return o.Name +} +func (o *SpdxDocument) SetName(v string) { + o.Name = v +} +func (o *SpdxDocument) GetSummary() string { + return o.Summary +} +func (o *SpdxDocument) SetSummary(v string) { + o.Summary = v +} +func (o *SpdxDocument) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *SpdxDocument) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *SpdxDocument) GetElements() []IElement { + return o.Elements +} +func (o *SpdxDocument) SetElements(v ...IElement) { + o.Elements = v +} +func (o *SpdxDocument) GetProfileConformance() []ProfileIdentifierType { + return o.ProfileConformance +} +func (o *SpdxDocument) SetProfileConformance(v ...ProfileIdentifierType) { + o.ProfileConformance = v +} +func (o *SpdxDocument) GetRootElements() []IElement { + return o.RootElements +} +func (o *SpdxDocument) SetRootElements(v ...IElement) { + o.RootElements = v +} + +func (o *SpdxDocument) GetDataLicense() IAnyLicenseInfo { + return o.DataLicense +} +func (o *SpdxDocument) SetDataLicense(v IAnyLicenseInfo) { + o.DataLicense = v +} +func (o *SpdxDocument) GetImports() []IExternalMap { + return o.Imports +} +func (o *SpdxDocument) SetImports(v ...IExternalMap) { + o.Imports = v +} +func (o *SpdxDocument) GetNamespaceMap() []INamespaceMap { + return o.NamespaceMap +} +func (o *SpdxDocument) SetNamespaceMap(v ...INamespaceMap) { + o.NamespaceMap = v +} + +type SupportType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/SupportType" iri-compact:"SupportType"` + + Iri string `iri:"@id"` +} + +var ( + SupportType_Deployed = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/deployed"} + SupportType_Development = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/development"} + SupportType_EndOfSupport = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/endOfSupport"} + SupportType_LimitedSupport = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/limitedSupport"} + SupportType_NoAssertion = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/noAssertion"} + SupportType_NoSupport = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/noSupport"} + SupportType_Support = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/support"} +) + +type ITool interface { + IElement +} + +type Tool struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Tool" iri-compact:"Tool" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +} + +func NewTool() ITool { + return &Tool{} +} + +func (o *Tool) GetSpdxId() string { + return o.SpdxId +} +func (o *Tool) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Tool) GetComment() string { + return o.Comment +} +func (o *Tool) SetComment(v string) { + o.Comment = v +} +func (o *Tool) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Tool) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Tool) GetDescription() string { + return o.Description +} +func (o *Tool) SetDescription(v string) { + o.Description = v +} +func (o *Tool) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Tool) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Tool) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Tool) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Tool) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Tool) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Tool) GetName() string { + return o.Name +} +func (o *Tool) SetName(v string) { + o.Name = v +} +func (o *Tool) GetSummary() string { + return o.Summary +} +func (o *Tool) SetSummary(v string) { + o.Summary = v +} +func (o *Tool) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Tool) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +type ConfidentialityLevelType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType" iri-compact:"dataset_ConfidentialityLevelType"` + + Iri string `iri:"@id"` +} + +var ( + ConfidentialityLevelType_Amber = ConfidentialityLevelType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/amber"} + ConfidentialityLevelType_Clear = ConfidentialityLevelType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/clear"} + ConfidentialityLevelType_Green = ConfidentialityLevelType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/green"} + ConfidentialityLevelType_Red = ConfidentialityLevelType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/red"} +) + +type DatasetAvailabilityType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType" iri-compact:"dataset_DatasetAvailabilityType"` + + Iri string `iri:"@id"` +} + +var ( + DatasetAvailabilityType_Clickthrough = DatasetAvailabilityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/clickthrough"} + DatasetAvailabilityType_DirectDownload = DatasetAvailabilityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/directDownload"} + DatasetAvailabilityType_Query = DatasetAvailabilityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/query"} + DatasetAvailabilityType_Registration = DatasetAvailabilityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/registration"} + DatasetAvailabilityType_ScrapingScript = DatasetAvailabilityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/scrapingScript"} +) + +type DatasetType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType" iri-compact:"dataset_DatasetType"` + + Iri string `iri:"@id"` +} + +var ( + DatasetType_Audio = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/audio"} + DatasetType_Categorical = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/categorical"} + DatasetType_Graph = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/graph"} + DatasetType_Image = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/image"} + DatasetType_NoAssertion = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/noAssertion"} + DatasetType_Numeric = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/numeric"} + DatasetType_Other = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/other"} + DatasetType_Sensor = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/sensor"} + DatasetType_Structured = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/structured"} + DatasetType_Syntactic = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/syntactic"} + DatasetType_Text = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/text"} + DatasetType_Timeseries = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/timeseries"} + DatasetType_Timestamp = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/timestamp"} + DatasetType_Video = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/video"} +) + +type ILicenseAddition interface { + IElement + + // GetAdditionText identifies the full text of a LicenseAddition. + GetAdditionText() string + + SetAdditionText(string) + + // GetIsDeprecatedAdditionId specifies whether an additional text identifier has been marked as deprecated. + GetIsDeprecatedAdditionId() bool + + SetIsDeprecatedAdditionId(bool) + + // GetLicenseXml identifies all the text and metadata associated with a license in the license + // XML format. + GetLicenseXml() string + + SetLicenseXml(string) + + // GetObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated + // License or LicenseAddition. + GetObsoletedBy() string + + SetObsoletedBy(string) + + // GetSeeAlso contains a URL where the License or LicenseAddition can be found in use. + GetSeeAlso() []string + + SetSeeAlso(...string) + + // GetStandardAdditionTemplate identifies the full text of a LicenseAddition, in SPDX templating format. + GetStandardAdditionTemplate() string + + SetStandardAdditionTemplate(string) +} + +type LicenseAddition struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/LicenseAddition" iri-compact:"expandedlicensing_LicenseAddition" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // AdditionText identifies the full text of a LicenseAddition. + AdditionText string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/additionText" iri-compact:"expandedlicensing_additionText"` + // IsDeprecatedAdditionId specifies whether an additional text identifier has been marked as deprecated. + IsDeprecatedAdditionId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedAdditionId" iri-compact:"expandedlicensing_isDeprecatedAdditionId"` + // LicenseXml identifies all the text and metadata associated with a license in the license + // XML format. + LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` + // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated + // License or LicenseAddition. + ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` + // SeeAlso contains a URL where the License or LicenseAddition can be found in use. + SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` + // StandardAdditionTemplate identifies the full text of a LicenseAddition, in SPDX templating format. + StandardAdditionTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardAdditionTemplate" iri-compact:"expandedlicensing_standardAdditionTemplate"` +} + +func (o *LicenseAddition) GetSpdxId() string { + return o.SpdxId +} +func (o *LicenseAddition) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *LicenseAddition) GetComment() string { + return o.Comment +} +func (o *LicenseAddition) SetComment(v string) { + o.Comment = v +} +func (o *LicenseAddition) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *LicenseAddition) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *LicenseAddition) GetDescription() string { + return o.Description +} +func (o *LicenseAddition) SetDescription(v string) { + o.Description = v +} +func (o *LicenseAddition) GetExtensions() []IExtension { + return o.Extensions +} +func (o *LicenseAddition) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *LicenseAddition) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *LicenseAddition) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *LicenseAddition) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *LicenseAddition) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *LicenseAddition) GetName() string { + return o.Name +} +func (o *LicenseAddition) SetName(v string) { + o.Name = v +} +func (o *LicenseAddition) GetSummary() string { + return o.Summary +} +func (o *LicenseAddition) SetSummary(v string) { + o.Summary = v +} +func (o *LicenseAddition) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *LicenseAddition) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *LicenseAddition) GetAdditionText() string { + return o.AdditionText +} +func (o *LicenseAddition) SetAdditionText(v string) { + o.AdditionText = v +} +func (o *LicenseAddition) GetIsDeprecatedAdditionId() bool { + return o.IsDeprecatedAdditionId +} +func (o *LicenseAddition) SetIsDeprecatedAdditionId(v bool) { + o.IsDeprecatedAdditionId = v +} +func (o *LicenseAddition) GetLicenseXml() string { + return o.LicenseXml +} +func (o *LicenseAddition) SetLicenseXml(v string) { + o.LicenseXml = v +} +func (o *LicenseAddition) GetObsoletedBy() string { + return o.ObsoletedBy +} +func (o *LicenseAddition) SetObsoletedBy(v string) { + o.ObsoletedBy = v +} +func (o *LicenseAddition) GetSeeAlso() []string { + return o.SeeAlso +} +func (o *LicenseAddition) SetSeeAlso(v ...string) { + o.SeeAlso = v +} +func (o *LicenseAddition) GetStandardAdditionTemplate() string { + return o.StandardAdditionTemplate +} +func (o *LicenseAddition) SetStandardAdditionTemplate(v string) { + o.StandardAdditionTemplate = v +} + +type IListedLicenseException interface { + ILicenseAddition + + // GetDeprecatedVersion specifies the SPDX License List version in which this license or exception + // identifier was deprecated. + GetDeprecatedVersion() string + + SetDeprecatedVersion(string) + + // GetListVersionAdded specifies the SPDX License List version in which this ListedLicense or + // ListedLicenseException identifier was first added. + GetListVersionAdded() string + + SetListVersionAdded(string) +} + +type ListedLicenseException struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/ListedLicenseException" iri-compact:"expandedlicensing_ListedLicenseException" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // AdditionText identifies the full text of a LicenseAddition. + AdditionText string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/additionText" iri-compact:"expandedlicensing_additionText"` + // IsDeprecatedAdditionId specifies whether an additional text identifier has been marked as deprecated. + IsDeprecatedAdditionId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedAdditionId" iri-compact:"expandedlicensing_isDeprecatedAdditionId"` + // LicenseXml identifies all the text and metadata associated with a license in the license + // XML format. + LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` + // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated + // License or LicenseAddition. + ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` + // SeeAlso contains a URL where the License or LicenseAddition can be found in use. + SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` + // StandardAdditionTemplate identifies the full text of a LicenseAddition, in SPDX templating format. + StandardAdditionTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardAdditionTemplate" iri-compact:"expandedlicensing_standardAdditionTemplate"` + + // DeprecatedVersion specifies the SPDX License List version in which this license or exception + // identifier was deprecated. + DeprecatedVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/deprecatedVersion" iri-compact:"expandedlicensing_deprecatedVersion"` + // ListVersionAdded specifies the SPDX License List version in which this ListedLicense or + // ListedLicenseException identifier was first added. + ListVersionAdded string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/listVersionAdded" iri-compact:"expandedlicensing_listVersionAdded"` +} + +func NewListedLicenseException() IListedLicenseException { + return &ListedLicenseException{} +} + +func (o *ListedLicenseException) GetSpdxId() string { + return o.SpdxId +} +func (o *ListedLicenseException) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *ListedLicenseException) GetComment() string { + return o.Comment +} +func (o *ListedLicenseException) SetComment(v string) { + o.Comment = v +} +func (o *ListedLicenseException) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *ListedLicenseException) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *ListedLicenseException) GetDescription() string { + return o.Description +} +func (o *ListedLicenseException) SetDescription(v string) { + o.Description = v +} +func (o *ListedLicenseException) GetExtensions() []IExtension { + return o.Extensions +} +func (o *ListedLicenseException) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *ListedLicenseException) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *ListedLicenseException) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *ListedLicenseException) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *ListedLicenseException) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *ListedLicenseException) GetName() string { + return o.Name +} +func (o *ListedLicenseException) SetName(v string) { + o.Name = v +} +func (o *ListedLicenseException) GetSummary() string { + return o.Summary +} +func (o *ListedLicenseException) SetSummary(v string) { + o.Summary = v +} +func (o *ListedLicenseException) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *ListedLicenseException) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *ListedLicenseException) GetAdditionText() string { + return o.AdditionText +} +func (o *ListedLicenseException) SetAdditionText(v string) { + o.AdditionText = v +} +func (o *ListedLicenseException) GetIsDeprecatedAdditionId() bool { + return o.IsDeprecatedAdditionId +} +func (o *ListedLicenseException) SetIsDeprecatedAdditionId(v bool) { + o.IsDeprecatedAdditionId = v +} +func (o *ListedLicenseException) GetLicenseXml() string { + return o.LicenseXml +} +func (o *ListedLicenseException) SetLicenseXml(v string) { + o.LicenseXml = v +} +func (o *ListedLicenseException) GetObsoletedBy() string { + return o.ObsoletedBy +} +func (o *ListedLicenseException) SetObsoletedBy(v string) { + o.ObsoletedBy = v +} +func (o *ListedLicenseException) GetSeeAlso() []string { + return o.SeeAlso +} +func (o *ListedLicenseException) SetSeeAlso(v ...string) { + o.SeeAlso = v +} +func (o *ListedLicenseException) GetStandardAdditionTemplate() string { + return o.StandardAdditionTemplate +} +func (o *ListedLicenseException) SetStandardAdditionTemplate(v string) { + o.StandardAdditionTemplate = v +} + +func (o *ListedLicenseException) GetDeprecatedVersion() string { + return o.DeprecatedVersion +} +func (o *ListedLicenseException) SetDeprecatedVersion(v string) { + o.DeprecatedVersion = v +} +func (o *ListedLicenseException) GetListVersionAdded() string { + return o.ListVersionAdded +} +func (o *ListedLicenseException) SetListVersionAdded(v string) { + o.ListVersionAdded = v +} + +type ICdxPropertyEntry interface { + + // GetCdxPropName a name used in a CdxExtension name-value pair. + GetCdxPropName() string + + SetCdxPropName(string) + + // GetCdxPropValue a value used in a CdxExtension name-value pair. + GetCdxPropValue() string + + SetCdxPropValue(string) +} + +type CdxPropertyEntry struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/CdxPropertyEntry" iri-compact:"extension_CdxPropertyEntry"` + + Iri string `iri:"@id"` + + // CdxPropName a name used in a CdxExtension name-value pair. + CdxPropName string `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/cdxPropName" iri-compact:"extension_cdxPropName"` + // CdxPropValue a value used in a CdxExtension name-value pair. + CdxPropValue string `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/cdxPropValue" iri-compact:"extension_cdxPropValue"` +} + +func NewCdxPropertyEntry() ICdxPropertyEntry { + return &CdxPropertyEntry{} +} + +func (o *CdxPropertyEntry) GetCdxPropName() string { + return o.CdxPropName +} +func (o *CdxPropertyEntry) SetCdxPropName(v string) { + o.CdxPropName = v +} +func (o *CdxPropertyEntry) GetCdxPropValue() string { + return o.CdxPropValue +} +func (o *CdxPropertyEntry) SetCdxPropValue(v string) { + o.CdxPropValue = v +} + +type IExtension interface { +} + +type Extension struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/Extension" iri-compact:"extension_Extension"` + + Iri string `iri:"@id"` +} + +type CvssSeverityType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType" iri-compact:"security_CvssSeverityType"` + + Iri string `iri:"@id"` +} + +var ( + CvssSeverityType_Critical = CvssSeverityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/critical"} + CvssSeverityType_High = CvssSeverityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/high"} + CvssSeverityType_Low = CvssSeverityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/low"} + CvssSeverityType_Medium = CvssSeverityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/medium"} + CvssSeverityType_None = CvssSeverityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/none"} +) + +type ExploitCatalogType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogType" iri-compact:"security_ExploitCatalogType"` + + Iri string `iri:"@id"` +} + +var ( + ExploitCatalogType_Kev = ExploitCatalogType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogType/kev"} + ExploitCatalogType_Other = ExploitCatalogType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogType/other"} +) + +type SsvcDecisionType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType" iri-compact:"security_SsvcDecisionType"` + + Iri string `iri:"@id"` +} + +var ( + SsvcDecisionType_Act = SsvcDecisionType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/act"} + SsvcDecisionType_Attend = SsvcDecisionType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/attend"} + SsvcDecisionType_Track = SsvcDecisionType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/track"} + SsvcDecisionType_TrackStar = SsvcDecisionType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/trackStar"} +) + +type VexJustificationType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType" iri-compact:"security_VexJustificationType"` + + Iri string `iri:"@id"` +} + +var ( + VexJustificationType_ComponentNotPresent = VexJustificationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/componentNotPresent"} + VexJustificationType_InlineMitigationsAlreadyExist = VexJustificationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/inlineMitigationsAlreadyExist"} + VexJustificationType_VulnerableCodeCannotBeControlledByAdversary = VexJustificationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeCannotBeControlledByAdversary"} + VexJustificationType_VulnerableCodeNotInExecutePath = VexJustificationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeNotInExecutePath"} + VexJustificationType_VulnerableCodeNotPresent = VexJustificationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeNotPresent"} +) + +type IVulnAssessmentRelationship interface { + IRelationship + + // GetSuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + GetSuppliedBy() IAgent + + SetSuppliedBy(IAgent) + + // GetAssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + GetAssessedElement() IElement + + SetAssessedElement(IElement) + + // GetModifiedTime specifies a time when a vulnerability assessment was modified + GetModifiedTime() string + + SetModifiedTime(string) + + // GetPublishedTime specifies the time when a vulnerability was published. + GetPublishedTime() string + + SetPublishedTime(string) + + // GetWithdrawnTime specified the time and date when a vulnerability was withdrawn. + GetWithdrawnTime() string + + SetWithdrawnTime(string) +} + +type VulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VulnAssessmentRelationship" iri-compact:"security_VulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` +} + +func (o *VulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *VulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *VulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *VulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *VulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *VulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *VulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *VulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *VulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *VulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *VulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *VulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *VulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *VulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *VulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *VulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *VulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *VulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *VulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *VulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *VulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *VulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *VulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *VulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *VulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *VulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *VulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *VulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *VulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *VulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *VulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *VulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *VulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *VulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *VulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *VulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *VulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *VulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *VulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *VulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *VulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *VulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +type IAnyLicenseInfo interface { + IElement +} + +type AnyLicenseInfo struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/AnyLicenseInfo" iri-compact:"simplelicensing_AnyLicenseInfo" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +} + +func (o *AnyLicenseInfo) GetSpdxId() string { + return o.SpdxId +} +func (o *AnyLicenseInfo) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *AnyLicenseInfo) GetComment() string { + return o.Comment +} +func (o *AnyLicenseInfo) SetComment(v string) { + o.Comment = v +} +func (o *AnyLicenseInfo) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *AnyLicenseInfo) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *AnyLicenseInfo) GetDescription() string { + return o.Description +} +func (o *AnyLicenseInfo) SetDescription(v string) { + o.Description = v +} +func (o *AnyLicenseInfo) GetExtensions() []IExtension { + return o.Extensions +} +func (o *AnyLicenseInfo) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *AnyLicenseInfo) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *AnyLicenseInfo) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *AnyLicenseInfo) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *AnyLicenseInfo) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *AnyLicenseInfo) GetName() string { + return o.Name +} +func (o *AnyLicenseInfo) SetName(v string) { + o.Name = v +} +func (o *AnyLicenseInfo) GetSummary() string { + return o.Summary +} +func (o *AnyLicenseInfo) SetSummary(v string) { + o.Summary = v +} +func (o *AnyLicenseInfo) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *AnyLicenseInfo) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +type ILicenseExpression interface { + IAnyLicenseInfo + + // GetCustomIdToUri maps a LicenseRef or AdditionRef string for a Custom License or a Custom + // License Addition to its URI ID. + GetCustomIdToUri() []IDictionaryEntry + + SetCustomIdToUri(...IDictionaryEntry) + + // GetLicenseExpression a string in the license expression format. + GetLicenseExpression() string + + SetLicenseExpression(string) + + // GetLicenseListVersion the version of the SPDX License List used in the license expression. + GetLicenseListVersion() string + + SetLicenseListVersion(string) +} + +type LicenseExpression struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/LicenseExpression" iri-compact:"simplelicensing_LicenseExpression" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // CustomIdToUri maps a LicenseRef or AdditionRef string for a Custom License or a Custom + // License Addition to its URI ID. + CustomIdToUri []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/customIdToUri" iri-compact:"simplelicensing_customIdToUri"` + // LicenseExpression a string in the license expression format. + LicenseExpression string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseExpression" iri-compact:"simplelicensing_licenseExpression"` + // LicenseListVersion the version of the SPDX License List used in the license expression. + LicenseListVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseListVersion" iri-compact:"simplelicensing_licenseListVersion"` +} + +func NewLicenseExpression() ILicenseExpression { + return &LicenseExpression{} +} + +func (o *LicenseExpression) GetSpdxId() string { + return o.SpdxId +} +func (o *LicenseExpression) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *LicenseExpression) GetComment() string { + return o.Comment +} +func (o *LicenseExpression) SetComment(v string) { + o.Comment = v +} +func (o *LicenseExpression) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *LicenseExpression) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *LicenseExpression) GetDescription() string { + return o.Description +} +func (o *LicenseExpression) SetDescription(v string) { + o.Description = v +} +func (o *LicenseExpression) GetExtensions() []IExtension { + return o.Extensions +} +func (o *LicenseExpression) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *LicenseExpression) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *LicenseExpression) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *LicenseExpression) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *LicenseExpression) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *LicenseExpression) GetName() string { + return o.Name +} +func (o *LicenseExpression) SetName(v string) { + o.Name = v +} +func (o *LicenseExpression) GetSummary() string { + return o.Summary +} +func (o *LicenseExpression) SetSummary(v string) { + o.Summary = v +} +func (o *LicenseExpression) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *LicenseExpression) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *LicenseExpression) GetCustomIdToUri() []IDictionaryEntry { + return o.CustomIdToUri +} +func (o *LicenseExpression) SetCustomIdToUri(v ...IDictionaryEntry) { + o.CustomIdToUri = v +} +func (o *LicenseExpression) GetLicenseExpression() string { + return o.LicenseExpression +} +func (o *LicenseExpression) SetLicenseExpression(v string) { + o.LicenseExpression = v +} +func (o *LicenseExpression) GetLicenseListVersion() string { + return o.LicenseListVersion +} +func (o *LicenseExpression) SetLicenseListVersion(v string) { + o.LicenseListVersion = v +} + +type ISimpleLicensingText interface { + IElement + + // GetLicenseText identifies the full text of a License or Addition. + GetLicenseText() string + + SetLicenseText(string) +} + +type SimpleLicensingText struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/SimpleLicensingText" iri-compact:"simplelicensing_SimpleLicensingText" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // LicenseText identifies the full text of a License or Addition. + LicenseText string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` +} + +func NewSimpleLicensingText() ISimpleLicensingText { + return &SimpleLicensingText{} +} + +func (o *SimpleLicensingText) GetSpdxId() string { + return o.SpdxId +} +func (o *SimpleLicensingText) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *SimpleLicensingText) GetComment() string { + return o.Comment +} +func (o *SimpleLicensingText) SetComment(v string) { + o.Comment = v +} +func (o *SimpleLicensingText) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *SimpleLicensingText) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *SimpleLicensingText) GetDescription() string { + return o.Description +} +func (o *SimpleLicensingText) SetDescription(v string) { + o.Description = v +} +func (o *SimpleLicensingText) GetExtensions() []IExtension { + return o.Extensions +} +func (o *SimpleLicensingText) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *SimpleLicensingText) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *SimpleLicensingText) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *SimpleLicensingText) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *SimpleLicensingText) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *SimpleLicensingText) GetName() string { + return o.Name +} +func (o *SimpleLicensingText) SetName(v string) { + o.Name = v +} +func (o *SimpleLicensingText) GetSummary() string { + return o.Summary +} +func (o *SimpleLicensingText) SetSummary(v string) { + o.Summary = v +} +func (o *SimpleLicensingText) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *SimpleLicensingText) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *SimpleLicensingText) GetLicenseText() string { + return o.LicenseText +} +func (o *SimpleLicensingText) SetLicenseText(v string) { + o.LicenseText = v +} + +type IContentIdentifier interface { + IIntegrityMethod + + // GetContentIdentifierType specifies the type of the content identifier. + GetContentIdentifierType() ContentIdentifierType + + SetContentIdentifierType(ContentIdentifierType) + + // GetContentIdentifierValue specifies the value of the content identifier. + GetContentIdentifierValue() string + + SetContentIdentifierValue(string) +} + +type ContentIdentifier struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifier" iri-compact:"software_ContentIdentifier"` + + Iri string `iri:"@id"` + + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + + // ContentIdentifierType specifies the type of the content identifier. + ContentIdentifierType ContentIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifierType" iri-compact:"software_contentIdentifierType"` + // ContentIdentifierValue specifies the value of the content identifier. + ContentIdentifierValue string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifierValue" iri-compact:"software_contentIdentifierValue"` +} + +func NewContentIdentifier() IContentIdentifier { + return &ContentIdentifier{} +} + +func (o *ContentIdentifier) GetComment() string { + return o.Comment +} +func (o *ContentIdentifier) SetComment(v string) { + o.Comment = v +} + +func (o *ContentIdentifier) GetContentIdentifierType() ContentIdentifierType { + return o.ContentIdentifierType +} +func (o *ContentIdentifier) SetContentIdentifierType(v ContentIdentifierType) { + o.ContentIdentifierType = v +} +func (o *ContentIdentifier) GetContentIdentifierValue() string { + return o.ContentIdentifierValue +} +func (o *ContentIdentifier) SetContentIdentifierValue(v string) { + o.ContentIdentifierValue = v +} + +type ContentIdentifierType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifierType" iri-compact:"software_ContentIdentifierType"` + + Iri string `iri:"@id"` +} + +var ( + ContentIdentifierType_Gitoid = ContentIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifierType/gitoid"} + ContentIdentifierType_Swhid = ContentIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifierType/swhid"} +) + +type FileKindType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/FileKindType" iri-compact:"software_FileKindType"` + + Iri string `iri:"@id"` +} + +var ( + FileKindType_Directory = FileKindType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/FileKindType/directory"} + FileKindType_File = FileKindType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/FileKindType/file"} +) + +type SbomType struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/SbomType" iri-compact:"software_SbomType"` + + Iri string `iri:"@id"` +} + +var ( + SbomType_Analyzed = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/analyzed"} + SbomType_Build = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/build"} + SbomType_Deployed = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/deployed"} + SbomType_Design = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/design"} + SbomType_Runtime = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/runtime"} + SbomType_Source = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/source"} +) + +type SoftwarePurpose struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose" iri-compact:"software_SoftwarePurpose"` + + Iri string `iri:"@id"` +} + +var ( + SoftwarePurpose_Application = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/application"} + SoftwarePurpose_Archive = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/archive"} + SoftwarePurpose_Bom = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/bom"} + SoftwarePurpose_Configuration = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/configuration"} + SoftwarePurpose_Container = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/container"} + SoftwarePurpose_Data = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/data"} + SoftwarePurpose_Device = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/device"} + SoftwarePurpose_DeviceDriver = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/deviceDriver"} + SoftwarePurpose_DiskImage = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/diskImage"} + SoftwarePurpose_Documentation = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/documentation"} + SoftwarePurpose_Evidence = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/evidence"} + SoftwarePurpose_Executable = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/executable"} + SoftwarePurpose_File = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/file"} + SoftwarePurpose_FilesystemImage = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/filesystemImage"} + SoftwarePurpose_Firmware = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/firmware"} + SoftwarePurpose_Framework = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/framework"} + SoftwarePurpose_Install = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/install"} + SoftwarePurpose_Library = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/library"} + SoftwarePurpose_Manifest = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/manifest"} + SoftwarePurpose_Model = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/model"} + SoftwarePurpose_Module = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/module"} + SoftwarePurpose_OperatingSystem = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/operatingSystem"} + SoftwarePurpose_Other = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/other"} + SoftwarePurpose_Patch = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/patch"} + SoftwarePurpose_Platform = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/platform"} + SoftwarePurpose_Requirement = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/requirement"} + SoftwarePurpose_Source = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/source"} + SoftwarePurpose_Specification = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/specification"} + SoftwarePurpose_Test = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/test"} +) + +type IBuild interface { + IElement + + // GetBuildEndTime property that describes the time at which a build stops. + GetBuildEndTime() string + + SetBuildEndTime(string) + + // GetBuildId a buildId is a locally unique identifier used by a builder to identify a unique + // instance of a build produced by it. + GetBuildId() string + + SetBuildId(string) + + // GetBuildStartTime property describing the start time of a build. + GetBuildStartTime() string + + SetBuildStartTime(string) + + // GetBuildType a buildType is a hint that is used to indicate the toolchain, platform, or + // infrastructure that the build was invoked on. + GetBuildType() string + + SetBuildType(string) + + // GetConfigSourceDigest property that describes the digest of the build configuration file used to + // invoke a build. + GetConfigSourceDigest() []IHash + + SetConfigSourceDigest(...IHash) + + // GetConfigSourceEntrypoint property describes the invocation entrypoint of a build. + GetConfigSourceEntrypoint() []string + + SetConfigSourceEntrypoint(...string) + + // GetConfigSourceUri property that describes the URI of the build configuration source file. + GetConfigSourceUri() []string + + SetConfigSourceUri(...string) + + // GetEnvironment property describing the session in which a build is invoked. + GetEnvironment() []IDictionaryEntry + + SetEnvironment(...IDictionaryEntry) + + // GetParameters property describing the parameters used in an instance of a build. + GetParameters() []IDictionaryEntry + + SetParameters(...IDictionaryEntry) +} + +type Build struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Build/Build" iri-compact:"build_Build" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // BuildEndTime property that describes the time at which a build stops. + BuildEndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/buildEndTime" iri-compact:"build_buildEndTime"` + // BuildId a buildId is a locally unique identifier used by a builder to identify a unique + // instance of a build produced by it. + BuildId string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/buildId" iri-compact:"build_buildId"` + // BuildStartTime property describing the start time of a build. + BuildStartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/buildStartTime" iri-compact:"build_buildStartTime"` + // BuildType a buildType is a hint that is used to indicate the toolchain, platform, or + // infrastructure that the build was invoked on. + BuildType string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/buildType" iri-compact:"build_buildType"` + // ConfigSourceDigest property that describes the digest of the build configuration file used to + // invoke a build. + ConfigSourceDigest []IHash `iri:"https://spdx.org/rdf/3.0.0/terms/Build/configSourceDigest" iri-compact:"build_configSourceDigest"` + // ConfigSourceEntrypoint property describes the invocation entrypoint of a build. + ConfigSourceEntrypoint []string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/configSourceEntrypoint" iri-compact:"build_configSourceEntrypoint"` + // ConfigSourceUri property that describes the URI of the build configuration source file. + ConfigSourceUri []string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/configSourceUri" iri-compact:"build_configSourceUri"` + // Environment property describing the session in which a build is invoked. + Environment []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/Build/environment" iri-compact:"build_environment"` + // Parameters property describing the parameters used in an instance of a build. + Parameters []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/Build/parameters" iri-compact:"build_parameters"` +} + +func NewBuild() IBuild { + return &Build{} +} + +func (o *Build) GetSpdxId() string { + return o.SpdxId +} +func (o *Build) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Build) GetComment() string { + return o.Comment +} +func (o *Build) SetComment(v string) { + o.Comment = v +} +func (o *Build) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Build) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Build) GetDescription() string { + return o.Description +} +func (o *Build) SetDescription(v string) { + o.Description = v +} +func (o *Build) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Build) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Build) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Build) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Build) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Build) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Build) GetName() string { + return o.Name +} +func (o *Build) SetName(v string) { + o.Name = v +} +func (o *Build) GetSummary() string { + return o.Summary +} +func (o *Build) SetSummary(v string) { + o.Summary = v +} +func (o *Build) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Build) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *Build) GetBuildEndTime() string { + return o.BuildEndTime +} +func (o *Build) SetBuildEndTime(v string) { + o.BuildEndTime = v +} +func (o *Build) GetBuildId() string { + return o.BuildId +} +func (o *Build) SetBuildId(v string) { + o.BuildId = v +} +func (o *Build) GetBuildStartTime() string { + return o.BuildStartTime +} +func (o *Build) SetBuildStartTime(v string) { + o.BuildStartTime = v +} +func (o *Build) GetBuildType() string { + return o.BuildType +} +func (o *Build) SetBuildType(v string) { + o.BuildType = v +} +func (o *Build) GetConfigSourceDigest() []IHash { + return o.ConfigSourceDigest +} +func (o *Build) SetConfigSourceDigest(v ...IHash) { + o.ConfigSourceDigest = v +} +func (o *Build) GetConfigSourceEntrypoint() []string { + return o.ConfigSourceEntrypoint +} +func (o *Build) SetConfigSourceEntrypoint(v ...string) { + o.ConfigSourceEntrypoint = v +} +func (o *Build) GetConfigSourceUri() []string { + return o.ConfigSourceUri +} +func (o *Build) SetConfigSourceUri(v ...string) { + o.ConfigSourceUri = v +} +func (o *Build) GetEnvironment() []IDictionaryEntry { + return o.Environment +} +func (o *Build) SetEnvironment(v ...IDictionaryEntry) { + o.Environment = v +} +func (o *Build) GetParameters() []IDictionaryEntry { + return o.Parameters +} +func (o *Build) SetParameters(v ...IDictionaryEntry) { + o.Parameters = v +} + +type IAgent interface { + IElement +} + +type Agent struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Agent" iri-compact:"Agent" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +} + +func NewAgent() IAgent { + return &Agent{} +} + +func (o *Agent) GetSpdxId() string { + return o.SpdxId +} +func (o *Agent) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Agent) GetComment() string { + return o.Comment +} +func (o *Agent) SetComment(v string) { + o.Comment = v +} +func (o *Agent) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Agent) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Agent) GetDescription() string { + return o.Description +} +func (o *Agent) SetDescription(v string) { + o.Description = v +} +func (o *Agent) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Agent) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Agent) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Agent) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Agent) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Agent) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Agent) GetName() string { + return o.Name +} +func (o *Agent) SetName(v string) { + o.Name = v +} +func (o *Agent) GetSummary() string { + return o.Summary +} +func (o *Agent) SetSummary(v string) { + o.Summary = v +} +func (o *Agent) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Agent) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +type IAnnotation interface { + IElement + + // GetAnnotationType describes the type of annotation. + GetAnnotationType() AnnotationType + + SetAnnotationType(AnnotationType) + + // GetContentType specifies the media type of an Element or Property. + GetContentType() string + + SetContentType(string) + + // GetStatement commentary on an assertion that an annotator has made. + GetStatement() string + + SetStatement(string) + + // GetSubject an Element an annotator has made an assertion about. + GetSubject() IElement + + SetSubject(IElement) +} + +type Annotation struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Annotation" iri-compact:"Annotation" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // AnnotationType describes the type of annotation. + AnnotationType AnnotationType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/annotationType" iri-compact:"annotationType"` + // ContentType specifies the media type of an Element or Property. + ContentType string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/contentType" iri-compact:"contentType"` + // Statement commentary on an assertion that an annotator has made. + Statement string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/statement" iri-compact:"statement"` + // Subject an Element an annotator has made an assertion about. + Subject IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/subject" iri-compact:"subject"` +} + +func NewAnnotation() IAnnotation { + return &Annotation{} +} + +func (o *Annotation) GetSpdxId() string { + return o.SpdxId +} +func (o *Annotation) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Annotation) GetComment() string { + return o.Comment +} +func (o *Annotation) SetComment(v string) { + o.Comment = v +} +func (o *Annotation) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Annotation) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Annotation) GetDescription() string { + return o.Description +} +func (o *Annotation) SetDescription(v string) { + o.Description = v +} +func (o *Annotation) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Annotation) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Annotation) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Annotation) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Annotation) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Annotation) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Annotation) GetName() string { + return o.Name +} +func (o *Annotation) SetName(v string) { + o.Name = v +} +func (o *Annotation) GetSummary() string { + return o.Summary +} +func (o *Annotation) SetSummary(v string) { + o.Summary = v +} +func (o *Annotation) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Annotation) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *Annotation) GetAnnotationType() AnnotationType { + return o.AnnotationType +} +func (o *Annotation) SetAnnotationType(v AnnotationType) { + o.AnnotationType = v +} +func (o *Annotation) GetContentType() string { + return o.ContentType +} +func (o *Annotation) SetContentType(v string) { + o.ContentType = v +} +func (o *Annotation) GetStatement() string { + return o.Statement +} +func (o *Annotation) SetStatement(v string) { + o.Statement = v +} +func (o *Annotation) GetSubject() IElement { + return o.Subject +} +func (o *Annotation) SetSubject(v IElement) { + o.Subject = v +} + +type IArtifact interface { + IElement + + // GetBuiltTime specifies the time an artifact was built. + GetBuiltTime() string + + SetBuiltTime(string) + + // GetOriginatedBy identifies from where or whom the Element originally came. + GetOriginatedBy() []IAgent + + SetOriginatedBy(...IAgent) + + // GetReleaseTime specifies the time an artifact was released. + GetReleaseTime() string + + SetReleaseTime(string) + + // GetStandardName the name of a relevant standard that may apply to an artifact. + GetStandardName() []string + + SetStandardName(...string) + + // GetSuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + GetSuppliedBy() IAgent + + SetSuppliedBy(IAgent) + + // GetSupportLevel specifies the level of support associated with an artifact. + GetSupportLevel() []SupportType + + SetSupportLevel(...SupportType) + + // GetValidUntilTime specifies until when the artifact can be used before its usage needs to be + // reassessed. + GetValidUntilTime() string + + SetValidUntilTime(string) +} + +type Artifact struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Artifact" iri-compact:"Artifact" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // BuiltTime specifies the time an artifact was built. + BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` + // OriginatedBy identifies from where or whom the Element originally came. + OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` + // ReleaseTime specifies the time an artifact was released. + ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` + // StandardName the name of a relevant standard that may apply to an artifact. + StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // SupportLevel specifies the level of support associated with an artifact. + SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` + // ValidUntilTime specifies until when the artifact can be used before its usage needs to be + // reassessed. + ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` +} + +func (o *Artifact) GetSpdxId() string { + return o.SpdxId +} +func (o *Artifact) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Artifact) GetComment() string { + return o.Comment +} +func (o *Artifact) SetComment(v string) { + o.Comment = v +} +func (o *Artifact) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Artifact) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Artifact) GetDescription() string { + return o.Description +} +func (o *Artifact) SetDescription(v string) { + o.Description = v +} +func (o *Artifact) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Artifact) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Artifact) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Artifact) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Artifact) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Artifact) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Artifact) GetName() string { + return o.Name +} +func (o *Artifact) SetName(v string) { + o.Name = v +} +func (o *Artifact) GetSummary() string { + return o.Summary +} +func (o *Artifact) SetSummary(v string) { + o.Summary = v +} +func (o *Artifact) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Artifact) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *Artifact) GetBuiltTime() string { + return o.BuiltTime +} +func (o *Artifact) SetBuiltTime(v string) { + o.BuiltTime = v +} +func (o *Artifact) GetOriginatedBy() []IAgent { + return o.OriginatedBy +} +func (o *Artifact) SetOriginatedBy(v ...IAgent) { + o.OriginatedBy = v +} +func (o *Artifact) GetReleaseTime() string { + return o.ReleaseTime +} +func (o *Artifact) SetReleaseTime(v string) { + o.ReleaseTime = v +} +func (o *Artifact) GetStandardName() []string { + return o.StandardName +} +func (o *Artifact) SetStandardName(v ...string) { + o.StandardName = v +} +func (o *Artifact) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *Artifact) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *Artifact) GetSupportLevel() []SupportType { + return o.SupportLevel +} +func (o *Artifact) SetSupportLevel(v ...SupportType) { + o.SupportLevel = v +} +func (o *Artifact) GetValidUntilTime() string { + return o.ValidUntilTime +} +func (o *Artifact) SetValidUntilTime(v string) { + o.ValidUntilTime = v +} + +type IBundle interface { + IElementCollection + + // GetContext gives information about the circumstances or unifying properties + // that Elements of the bundle have been assembled under. + GetContext() string + + SetContext(string) +} + +type Bundle struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Bundle" iri-compact:"Bundle" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Elements refers to one or more Elements that are part of an ElementCollection. + Elements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/element" iri-compact:"element"` + // ProfileConformance describes one a profile which the creator of this ElementCollection intends to + // conform to. + ProfileConformance []ProfileIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/profileConformance" iri-compact:"profileConformance"` + // RootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. + RootElements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/rootElement" iri-compact:"rootElement"` + + // Context gives information about the circumstances or unifying properties + // that Elements of the bundle have been assembled under. + Context string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/context" iri-compact:"context"` +} + +func NewBundle() IBundle { + return &Bundle{} +} + +func (o *Bundle) GetSpdxId() string { + return o.SpdxId +} +func (o *Bundle) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Bundle) GetComment() string { + return o.Comment +} +func (o *Bundle) SetComment(v string) { + o.Comment = v +} +func (o *Bundle) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Bundle) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Bundle) GetDescription() string { + return o.Description +} +func (o *Bundle) SetDescription(v string) { + o.Description = v +} +func (o *Bundle) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Bundle) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Bundle) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Bundle) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Bundle) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Bundle) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Bundle) GetName() string { + return o.Name +} +func (o *Bundle) SetName(v string) { + o.Name = v +} +func (o *Bundle) GetSummary() string { + return o.Summary +} +func (o *Bundle) SetSummary(v string) { + o.Summary = v +} +func (o *Bundle) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Bundle) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *Bundle) GetElements() []IElement { + return o.Elements +} +func (o *Bundle) SetElements(v ...IElement) { + o.Elements = v +} +func (o *Bundle) GetProfileConformance() []ProfileIdentifierType { + return o.ProfileConformance +} +func (o *Bundle) SetProfileConformance(v ...ProfileIdentifierType) { + o.ProfileConformance = v +} +func (o *Bundle) GetRootElements() []IElement { + return o.RootElements +} +func (o *Bundle) SetRootElements(v ...IElement) { + o.RootElements = v +} + +func (o *Bundle) GetContext() string { + return o.Context +} +func (o *Bundle) SetContext(v string) { + o.Context = v +} + +type IHash interface { + IIntegrityMethod + + // GetAlgorithm specifies the algorithm used for calculating the hash value. + GetAlgorithm() HashAlgorithm + + SetAlgorithm(HashAlgorithm) + + // GetHashValue the result of applying a hash algorithm to an Element. + GetHashValue() string + + SetHashValue(string) +} + +type Hash struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Hash" iri-compact:"Hash"` + + Iri string `iri:"@id"` + + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + + // Algorithm specifies the algorithm used for calculating the hash value. + Algorithm HashAlgorithm `iri:"https://spdx.org/rdf/3.0.0/terms/Core/algorithm" iri-compact:"algorithm"` + // HashValue the result of applying a hash algorithm to an Element. + HashValue string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/hashValue" iri-compact:"hashValue"` +} + +func NewHash() IHash { + return &Hash{} +} + +func (o *Hash) GetComment() string { + return o.Comment +} +func (o *Hash) SetComment(v string) { + o.Comment = v +} + +func (o *Hash) GetAlgorithm() HashAlgorithm { + return o.Algorithm +} +func (o *Hash) SetAlgorithm(v HashAlgorithm) { + o.Algorithm = v +} +func (o *Hash) GetHashValue() string { + return o.HashValue +} +func (o *Hash) SetHashValue(v string) { + o.HashValue = v +} + +type ILifecycleScopedRelationship interface { + IRelationship + + // GetScope capture the scope of information about a specific relationship between elements. + GetScope() LifecycleScopeType + + SetScope(LifecycleScopeType) +} + +type LifecycleScopedRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopedRelationship" iri-compact:"LifecycleScopedRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // Scope capture the scope of information about a specific relationship between elements. + Scope LifecycleScopeType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/scope" iri-compact:"scope"` +} + +func NewLifecycleScopedRelationship() ILifecycleScopedRelationship { + return &LifecycleScopedRelationship{} +} + +func (o *LifecycleScopedRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *LifecycleScopedRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *LifecycleScopedRelationship) GetComment() string { + return o.Comment +} +func (o *LifecycleScopedRelationship) SetComment(v string) { + o.Comment = v +} +func (o *LifecycleScopedRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *LifecycleScopedRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *LifecycleScopedRelationship) GetDescription() string { + return o.Description +} +func (o *LifecycleScopedRelationship) SetDescription(v string) { + o.Description = v +} +func (o *LifecycleScopedRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *LifecycleScopedRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *LifecycleScopedRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *LifecycleScopedRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *LifecycleScopedRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *LifecycleScopedRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *LifecycleScopedRelationship) GetName() string { + return o.Name +} +func (o *LifecycleScopedRelationship) SetName(v string) { + o.Name = v +} +func (o *LifecycleScopedRelationship) GetSummary() string { + return o.Summary +} +func (o *LifecycleScopedRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *LifecycleScopedRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *LifecycleScopedRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *LifecycleScopedRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *LifecycleScopedRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *LifecycleScopedRelationship) GetEndTime() string { + return o.EndTime +} +func (o *LifecycleScopedRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *LifecycleScopedRelationship) GetFrom() IElement { + return o.From +} +func (o *LifecycleScopedRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *LifecycleScopedRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *LifecycleScopedRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *LifecycleScopedRelationship) GetStartTime() string { + return o.StartTime +} +func (o *LifecycleScopedRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *LifecycleScopedRelationship) GetTo() []IElement { + return o.To +} +func (o *LifecycleScopedRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *LifecycleScopedRelationship) GetScope() LifecycleScopeType { + return o.Scope +} +func (o *LifecycleScopedRelationship) SetScope(v LifecycleScopeType) { + o.Scope = v +} + +type IOrganization interface { + IAgent +} + +type Organization struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Organization" iri-compact:"Organization" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +} + +func NewOrganization() IOrganization { + return &Organization{} +} + +func (o *Organization) GetSpdxId() string { + return o.SpdxId +} +func (o *Organization) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Organization) GetComment() string { + return o.Comment +} +func (o *Organization) SetComment(v string) { + o.Comment = v +} +func (o *Organization) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Organization) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Organization) GetDescription() string { + return o.Description +} +func (o *Organization) SetDescription(v string) { + o.Description = v +} +func (o *Organization) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Organization) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Organization) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Organization) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Organization) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Organization) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Organization) GetName() string { + return o.Name +} +func (o *Organization) SetName(v string) { + o.Name = v +} +func (o *Organization) GetSummary() string { + return o.Summary +} +func (o *Organization) SetSummary(v string) { + o.Summary = v +} +func (o *Organization) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Organization) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +type IPerson interface { + IAgent +} + +type Person struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Person" iri-compact:"Person" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +} + +func NewPerson() IPerson { + return &Person{} +} + +func (o *Person) GetSpdxId() string { + return o.SpdxId +} +func (o *Person) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Person) GetComment() string { + return o.Comment +} +func (o *Person) SetComment(v string) { + o.Comment = v +} +func (o *Person) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Person) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Person) GetDescription() string { + return o.Description +} +func (o *Person) SetDescription(v string) { + o.Description = v +} +func (o *Person) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Person) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Person) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Person) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Person) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Person) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Person) GetName() string { + return o.Name +} +func (o *Person) SetName(v string) { + o.Name = v +} +func (o *Person) GetSummary() string { + return o.Summary +} +func (o *Person) SetSummary(v string) { + o.Summary = v +} +func (o *Person) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Person) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +type ISoftwareAgent interface { + IAgent +} + +type SoftwareAgent struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/SoftwareAgent" iri-compact:"SoftwareAgent" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +} + +func NewSoftwareAgent() ISoftwareAgent { + return &SoftwareAgent{} +} + +func (o *SoftwareAgent) GetSpdxId() string { + return o.SpdxId +} +func (o *SoftwareAgent) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *SoftwareAgent) GetComment() string { + return o.Comment +} +func (o *SoftwareAgent) SetComment(v string) { + o.Comment = v +} +func (o *SoftwareAgent) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *SoftwareAgent) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *SoftwareAgent) GetDescription() string { + return o.Description +} +func (o *SoftwareAgent) SetDescription(v string) { + o.Description = v +} +func (o *SoftwareAgent) GetExtensions() []IExtension { + return o.Extensions +} +func (o *SoftwareAgent) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *SoftwareAgent) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *SoftwareAgent) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *SoftwareAgent) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *SoftwareAgent) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *SoftwareAgent) GetName() string { + return o.Name +} +func (o *SoftwareAgent) SetName(v string) { + o.Name = v +} +func (o *SoftwareAgent) GetSummary() string { + return o.Summary +} +func (o *SoftwareAgent) SetSummary(v string) { + o.Summary = v +} +func (o *SoftwareAgent) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *SoftwareAgent) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +type IConjunctiveLicenseSet interface { + IAnyLicenseInfo + + // GetMember a license expression participating in a license set. + GetMember() []IAnyLicenseInfo + + SetMember(...IAnyLicenseInfo) +} + +type ConjunctiveLicenseSet struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/ConjunctiveLicenseSet" iri-compact:"expandedlicensing_ConjunctiveLicenseSet" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Member a license expression participating in a license set. + Member []IAnyLicenseInfo `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/member" iri-compact:"expandedlicensing_member"` +} + +func NewConjunctiveLicenseSet() IConjunctiveLicenseSet { + return &ConjunctiveLicenseSet{} +} + +func (o *ConjunctiveLicenseSet) GetSpdxId() string { + return o.SpdxId +} +func (o *ConjunctiveLicenseSet) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *ConjunctiveLicenseSet) GetComment() string { + return o.Comment +} +func (o *ConjunctiveLicenseSet) SetComment(v string) { + o.Comment = v +} +func (o *ConjunctiveLicenseSet) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *ConjunctiveLicenseSet) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *ConjunctiveLicenseSet) GetDescription() string { + return o.Description +} +func (o *ConjunctiveLicenseSet) SetDescription(v string) { + o.Description = v +} +func (o *ConjunctiveLicenseSet) GetExtensions() []IExtension { + return o.Extensions +} +func (o *ConjunctiveLicenseSet) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *ConjunctiveLicenseSet) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *ConjunctiveLicenseSet) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *ConjunctiveLicenseSet) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *ConjunctiveLicenseSet) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *ConjunctiveLicenseSet) GetName() string { + return o.Name +} +func (o *ConjunctiveLicenseSet) SetName(v string) { + o.Name = v +} +func (o *ConjunctiveLicenseSet) GetSummary() string { + return o.Summary +} +func (o *ConjunctiveLicenseSet) SetSummary(v string) { + o.Summary = v +} +func (o *ConjunctiveLicenseSet) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *ConjunctiveLicenseSet) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *ConjunctiveLicenseSet) GetMember() []IAnyLicenseInfo { + return o.Member +} +func (o *ConjunctiveLicenseSet) SetMember(v ...IAnyLicenseInfo) { + o.Member = v +} + +type ICustomLicenseAddition interface { + ILicenseAddition +} + +type CustomLicenseAddition struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/CustomLicenseAddition" iri-compact:"expandedlicensing_CustomLicenseAddition" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // AdditionText identifies the full text of a LicenseAddition. + AdditionText string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/additionText" iri-compact:"expandedlicensing_additionText"` + // IsDeprecatedAdditionId specifies whether an additional text identifier has been marked as deprecated. + IsDeprecatedAdditionId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedAdditionId" iri-compact:"expandedlicensing_isDeprecatedAdditionId"` + // LicenseXml identifies all the text and metadata associated with a license in the license + // XML format. + LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` + // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated + // License or LicenseAddition. + ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` + // SeeAlso contains a URL where the License or LicenseAddition can be found in use. + SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` + // StandardAdditionTemplate identifies the full text of a LicenseAddition, in SPDX templating format. + StandardAdditionTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardAdditionTemplate" iri-compact:"expandedlicensing_standardAdditionTemplate"` +} + +func NewCustomLicenseAddition() ICustomLicenseAddition { + return &CustomLicenseAddition{} +} + +func (o *CustomLicenseAddition) GetSpdxId() string { + return o.SpdxId +} +func (o *CustomLicenseAddition) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *CustomLicenseAddition) GetComment() string { + return o.Comment +} +func (o *CustomLicenseAddition) SetComment(v string) { + o.Comment = v +} +func (o *CustomLicenseAddition) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *CustomLicenseAddition) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *CustomLicenseAddition) GetDescription() string { + return o.Description +} +func (o *CustomLicenseAddition) SetDescription(v string) { + o.Description = v +} +func (o *CustomLicenseAddition) GetExtensions() []IExtension { + return o.Extensions +} +func (o *CustomLicenseAddition) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *CustomLicenseAddition) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *CustomLicenseAddition) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *CustomLicenseAddition) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *CustomLicenseAddition) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *CustomLicenseAddition) GetName() string { + return o.Name +} +func (o *CustomLicenseAddition) SetName(v string) { + o.Name = v +} +func (o *CustomLicenseAddition) GetSummary() string { + return o.Summary +} +func (o *CustomLicenseAddition) SetSummary(v string) { + o.Summary = v +} +func (o *CustomLicenseAddition) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *CustomLicenseAddition) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *CustomLicenseAddition) GetAdditionText() string { + return o.AdditionText +} +func (o *CustomLicenseAddition) SetAdditionText(v string) { + o.AdditionText = v +} +func (o *CustomLicenseAddition) GetIsDeprecatedAdditionId() bool { + return o.IsDeprecatedAdditionId +} +func (o *CustomLicenseAddition) SetIsDeprecatedAdditionId(v bool) { + o.IsDeprecatedAdditionId = v +} +func (o *CustomLicenseAddition) GetLicenseXml() string { + return o.LicenseXml +} +func (o *CustomLicenseAddition) SetLicenseXml(v string) { + o.LicenseXml = v +} +func (o *CustomLicenseAddition) GetObsoletedBy() string { + return o.ObsoletedBy +} +func (o *CustomLicenseAddition) SetObsoletedBy(v string) { + o.ObsoletedBy = v +} +func (o *CustomLicenseAddition) GetSeeAlso() []string { + return o.SeeAlso +} +func (o *CustomLicenseAddition) SetSeeAlso(v ...string) { + o.SeeAlso = v +} +func (o *CustomLicenseAddition) GetStandardAdditionTemplate() string { + return o.StandardAdditionTemplate +} +func (o *CustomLicenseAddition) SetStandardAdditionTemplate(v string) { + o.StandardAdditionTemplate = v +} + +type IDisjunctiveLicenseSet interface { + IAnyLicenseInfo + + // GetMember a license expression participating in a license set. + GetMember() []IAnyLicenseInfo + + SetMember(...IAnyLicenseInfo) +} + +type DisjunctiveLicenseSet struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/DisjunctiveLicenseSet" iri-compact:"expandedlicensing_DisjunctiveLicenseSet" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Member a license expression participating in a license set. + Member []IAnyLicenseInfo `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/member" iri-compact:"expandedlicensing_member"` +} + +func NewDisjunctiveLicenseSet() IDisjunctiveLicenseSet { + return &DisjunctiveLicenseSet{} +} + +func (o *DisjunctiveLicenseSet) GetSpdxId() string { + return o.SpdxId +} +func (o *DisjunctiveLicenseSet) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *DisjunctiveLicenseSet) GetComment() string { + return o.Comment +} +func (o *DisjunctiveLicenseSet) SetComment(v string) { + o.Comment = v +} +func (o *DisjunctiveLicenseSet) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *DisjunctiveLicenseSet) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *DisjunctiveLicenseSet) GetDescription() string { + return o.Description +} +func (o *DisjunctiveLicenseSet) SetDescription(v string) { + o.Description = v +} +func (o *DisjunctiveLicenseSet) GetExtensions() []IExtension { + return o.Extensions +} +func (o *DisjunctiveLicenseSet) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *DisjunctiveLicenseSet) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *DisjunctiveLicenseSet) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *DisjunctiveLicenseSet) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *DisjunctiveLicenseSet) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *DisjunctiveLicenseSet) GetName() string { + return o.Name +} +func (o *DisjunctiveLicenseSet) SetName(v string) { + o.Name = v +} +func (o *DisjunctiveLicenseSet) GetSummary() string { + return o.Summary +} +func (o *DisjunctiveLicenseSet) SetSummary(v string) { + o.Summary = v +} +func (o *DisjunctiveLicenseSet) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *DisjunctiveLicenseSet) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *DisjunctiveLicenseSet) GetMember() []IAnyLicenseInfo { + return o.Member +} +func (o *DisjunctiveLicenseSet) SetMember(v ...IAnyLicenseInfo) { + o.Member = v +} + +type IExtendableLicense interface { + IAnyLicenseInfo +} + +type ExtendableLicense struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/ExtendableLicense" iri-compact:"expandedlicensing_ExtendableLicense" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +} + +func (o *ExtendableLicense) GetSpdxId() string { + return o.SpdxId +} +func (o *ExtendableLicense) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *ExtendableLicense) GetComment() string { + return o.Comment +} +func (o *ExtendableLicense) SetComment(v string) { + o.Comment = v +} +func (o *ExtendableLicense) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *ExtendableLicense) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *ExtendableLicense) GetDescription() string { + return o.Description +} +func (o *ExtendableLicense) SetDescription(v string) { + o.Description = v +} +func (o *ExtendableLicense) GetExtensions() []IExtension { + return o.Extensions +} +func (o *ExtendableLicense) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *ExtendableLicense) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *ExtendableLicense) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *ExtendableLicense) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *ExtendableLicense) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *ExtendableLicense) GetName() string { + return o.Name +} +func (o *ExtendableLicense) SetName(v string) { + o.Name = v +} +func (o *ExtendableLicense) GetSummary() string { + return o.Summary +} +func (o *ExtendableLicense) SetSummary(v string) { + o.Summary = v +} +func (o *ExtendableLicense) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *ExtendableLicense) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +type IIndividualLicensingInfo interface { + IAnyLicenseInfo +} + +type IndividualLicensingInfo struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/IndividualLicensingInfo" iri-compact:"expandedlicensing_IndividualLicensingInfo" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +} + +func NewIndividualLicensingInfo() IIndividualLicensingInfo { + return &IndividualLicensingInfo{} +} + +func (o *IndividualLicensingInfo) GetSpdxId() string { + return o.SpdxId +} +func (o *IndividualLicensingInfo) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *IndividualLicensingInfo) GetComment() string { + return o.Comment +} +func (o *IndividualLicensingInfo) SetComment(v string) { + o.Comment = v +} +func (o *IndividualLicensingInfo) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *IndividualLicensingInfo) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *IndividualLicensingInfo) GetDescription() string { + return o.Description +} +func (o *IndividualLicensingInfo) SetDescription(v string) { + o.Description = v +} +func (o *IndividualLicensingInfo) GetExtensions() []IExtension { + return o.Extensions +} +func (o *IndividualLicensingInfo) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *IndividualLicensingInfo) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *IndividualLicensingInfo) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *IndividualLicensingInfo) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *IndividualLicensingInfo) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *IndividualLicensingInfo) GetName() string { + return o.Name +} +func (o *IndividualLicensingInfo) SetName(v string) { + o.Name = v +} +func (o *IndividualLicensingInfo) GetSummary() string { + return o.Summary +} +func (o *IndividualLicensingInfo) SetSummary(v string) { + o.Summary = v +} +func (o *IndividualLicensingInfo) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *IndividualLicensingInfo) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +type ILicense interface { + IExtendableLicense + + // GetIsDeprecatedLicenseId specifies whether a license or additional text identifier has been marked as + // deprecated. + GetIsDeprecatedLicenseId() bool + + SetIsDeprecatedLicenseId(bool) + + // GetIsFsfLibre specifies whether the License is listed as free by the + // [Free Software Foundation (FSF)](https://fsf.org). + GetIsFsfLibre() bool + + SetIsFsfLibre(bool) + + // GetIsOsiApproved specifies whether the License is listed as approved by the + // [Open Source Initiative (OSI)](https://opensource.org). + GetIsOsiApproved() bool + + SetIsOsiApproved(bool) + + // GetLicenseXml identifies all the text and metadata associated with a license in the license + // XML format. + GetLicenseXml() string + + SetLicenseXml(string) + + // GetObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated + // License or LicenseAddition. + GetObsoletedBy() string + + SetObsoletedBy(string) + + // GetSeeAlso contains a URL where the License or LicenseAddition can be found in use. + GetSeeAlso() []string + + SetSeeAlso(...string) + + // GetStandardLicenseHeader provides a License author's preferred text to indicate that a file is covered + // by the License. + GetStandardLicenseHeader() string + + SetStandardLicenseHeader(string) + + // GetStandardLicenseTemplate identifies the full text of a License, in SPDX templating format. + GetStandardLicenseTemplate() string + + SetStandardLicenseTemplate(string) + + // GetLicenseText identifies the full text of a License or Addition. + GetLicenseText() string + + SetLicenseText(string) +} + +type License struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/License" iri-compact:"expandedlicensing_License" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // IsDeprecatedLicenseId specifies whether a license or additional text identifier has been marked as + // deprecated. + IsDeprecatedLicenseId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedLicenseId" iri-compact:"expandedlicensing_isDeprecatedLicenseId"` + // IsFsfLibre specifies whether the License is listed as free by the + // [Free Software Foundation (FSF)](https://fsf.org). + IsFsfLibre bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isFsfLibre" iri-compact:"expandedlicensing_isFsfLibre"` + // IsOsiApproved specifies whether the License is listed as approved by the + // [Open Source Initiative (OSI)](https://opensource.org). + IsOsiApproved bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isOsiApproved" iri-compact:"expandedlicensing_isOsiApproved"` + // LicenseXml identifies all the text and metadata associated with a license in the license + // XML format. + LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` + // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated + // License or LicenseAddition. + ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` + // SeeAlso contains a URL where the License or LicenseAddition can be found in use. + SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` + // StandardLicenseHeader provides a License author's preferred text to indicate that a file is covered + // by the License. + StandardLicenseHeader string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseHeader" iri-compact:"expandedlicensing_standardLicenseHeader"` + // StandardLicenseTemplate identifies the full text of a License, in SPDX templating format. + StandardLicenseTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseTemplate" iri-compact:"expandedlicensing_standardLicenseTemplate"` + // LicenseText identifies the full text of a License or Addition. + LicenseText string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` +} + +func (o *License) GetSpdxId() string { + return o.SpdxId +} +func (o *License) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *License) GetComment() string { + return o.Comment +} +func (o *License) SetComment(v string) { + o.Comment = v +} +func (o *License) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *License) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *License) GetDescription() string { + return o.Description +} +func (o *License) SetDescription(v string) { + o.Description = v +} +func (o *License) GetExtensions() []IExtension { + return o.Extensions +} +func (o *License) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *License) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *License) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *License) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *License) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *License) GetName() string { + return o.Name +} +func (o *License) SetName(v string) { + o.Name = v +} +func (o *License) GetSummary() string { + return o.Summary +} +func (o *License) SetSummary(v string) { + o.Summary = v +} +func (o *License) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *License) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *License) GetIsDeprecatedLicenseId() bool { + return o.IsDeprecatedLicenseId +} +func (o *License) SetIsDeprecatedLicenseId(v bool) { + o.IsDeprecatedLicenseId = v +} +func (o *License) GetIsFsfLibre() bool { + return o.IsFsfLibre +} +func (o *License) SetIsFsfLibre(v bool) { + o.IsFsfLibre = v +} +func (o *License) GetIsOsiApproved() bool { + return o.IsOsiApproved +} +func (o *License) SetIsOsiApproved(v bool) { + o.IsOsiApproved = v +} +func (o *License) GetLicenseXml() string { + return o.LicenseXml +} +func (o *License) SetLicenseXml(v string) { + o.LicenseXml = v +} +func (o *License) GetObsoletedBy() string { + return o.ObsoletedBy +} +func (o *License) SetObsoletedBy(v string) { + o.ObsoletedBy = v +} +func (o *License) GetSeeAlso() []string { + return o.SeeAlso +} +func (o *License) SetSeeAlso(v ...string) { + o.SeeAlso = v +} +func (o *License) GetStandardLicenseHeader() string { + return o.StandardLicenseHeader +} +func (o *License) SetStandardLicenseHeader(v string) { + o.StandardLicenseHeader = v +} +func (o *License) GetStandardLicenseTemplate() string { + return o.StandardLicenseTemplate +} +func (o *License) SetStandardLicenseTemplate(v string) { + o.StandardLicenseTemplate = v +} +func (o *License) GetLicenseText() string { + return o.LicenseText +} +func (o *License) SetLicenseText(v string) { + o.LicenseText = v +} + +type IListedLicense interface { + ILicense + + // GetDeprecatedVersion specifies the SPDX License List version in which this license or exception + // identifier was deprecated. + GetDeprecatedVersion() string + + SetDeprecatedVersion(string) + + // GetListVersionAdded specifies the SPDX License List version in which this ListedLicense or + // ListedLicenseException identifier was first added. + GetListVersionAdded() string + + SetListVersionAdded(string) +} + +type ListedLicense struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/ListedLicense" iri-compact:"expandedlicensing_ListedLicense" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // IsDeprecatedLicenseId specifies whether a license or additional text identifier has been marked as + // deprecated. + IsDeprecatedLicenseId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedLicenseId" iri-compact:"expandedlicensing_isDeprecatedLicenseId"` + // IsFsfLibre specifies whether the License is listed as free by the + // [Free Software Foundation (FSF)](https://fsf.org). + IsFsfLibre bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isFsfLibre" iri-compact:"expandedlicensing_isFsfLibre"` + // IsOsiApproved specifies whether the License is listed as approved by the + // [Open Source Initiative (OSI)](https://opensource.org). + IsOsiApproved bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isOsiApproved" iri-compact:"expandedlicensing_isOsiApproved"` + // LicenseXml identifies all the text and metadata associated with a license in the license + // XML format. + LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` + // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated + // License or LicenseAddition. + ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` + // SeeAlso contains a URL where the License or LicenseAddition can be found in use. + SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` + // StandardLicenseHeader provides a License author's preferred text to indicate that a file is covered + // by the License. + StandardLicenseHeader string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseHeader" iri-compact:"expandedlicensing_standardLicenseHeader"` + // StandardLicenseTemplate identifies the full text of a License, in SPDX templating format. + StandardLicenseTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseTemplate" iri-compact:"expandedlicensing_standardLicenseTemplate"` + // LicenseText identifies the full text of a License or Addition. + LicenseText string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` + + // DeprecatedVersion specifies the SPDX License List version in which this license or exception + // identifier was deprecated. + DeprecatedVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/deprecatedVersion" iri-compact:"expandedlicensing_deprecatedVersion"` + // ListVersionAdded specifies the SPDX License List version in which this ListedLicense or + // ListedLicenseException identifier was first added. + ListVersionAdded string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/listVersionAdded" iri-compact:"expandedlicensing_listVersionAdded"` +} + +func NewListedLicense() IListedLicense { + return &ListedLicense{} +} + +func (o *ListedLicense) GetSpdxId() string { + return o.SpdxId +} +func (o *ListedLicense) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *ListedLicense) GetComment() string { + return o.Comment +} +func (o *ListedLicense) SetComment(v string) { + o.Comment = v +} +func (o *ListedLicense) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *ListedLicense) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *ListedLicense) GetDescription() string { + return o.Description +} +func (o *ListedLicense) SetDescription(v string) { + o.Description = v +} +func (o *ListedLicense) GetExtensions() []IExtension { + return o.Extensions +} +func (o *ListedLicense) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *ListedLicense) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *ListedLicense) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *ListedLicense) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *ListedLicense) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *ListedLicense) GetName() string { + return o.Name +} +func (o *ListedLicense) SetName(v string) { + o.Name = v +} +func (o *ListedLicense) GetSummary() string { + return o.Summary +} +func (o *ListedLicense) SetSummary(v string) { + o.Summary = v +} +func (o *ListedLicense) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *ListedLicense) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *ListedLicense) GetIsDeprecatedLicenseId() bool { + return o.IsDeprecatedLicenseId +} +func (o *ListedLicense) SetIsDeprecatedLicenseId(v bool) { + o.IsDeprecatedLicenseId = v +} +func (o *ListedLicense) GetIsFsfLibre() bool { + return o.IsFsfLibre +} +func (o *ListedLicense) SetIsFsfLibre(v bool) { + o.IsFsfLibre = v +} +func (o *ListedLicense) GetIsOsiApproved() bool { + return o.IsOsiApproved +} +func (o *ListedLicense) SetIsOsiApproved(v bool) { + o.IsOsiApproved = v +} +func (o *ListedLicense) GetLicenseXml() string { + return o.LicenseXml +} +func (o *ListedLicense) SetLicenseXml(v string) { + o.LicenseXml = v +} +func (o *ListedLicense) GetObsoletedBy() string { + return o.ObsoletedBy +} +func (o *ListedLicense) SetObsoletedBy(v string) { + o.ObsoletedBy = v +} +func (o *ListedLicense) GetSeeAlso() []string { + return o.SeeAlso +} +func (o *ListedLicense) SetSeeAlso(v ...string) { + o.SeeAlso = v +} +func (o *ListedLicense) GetStandardLicenseHeader() string { + return o.StandardLicenseHeader +} +func (o *ListedLicense) SetStandardLicenseHeader(v string) { + o.StandardLicenseHeader = v +} +func (o *ListedLicense) GetStandardLicenseTemplate() string { + return o.StandardLicenseTemplate +} +func (o *ListedLicense) SetStandardLicenseTemplate(v string) { + o.StandardLicenseTemplate = v +} +func (o *ListedLicense) GetLicenseText() string { + return o.LicenseText +} +func (o *ListedLicense) SetLicenseText(v string) { + o.LicenseText = v +} + +func (o *ListedLicense) GetDeprecatedVersion() string { + return o.DeprecatedVersion +} +func (o *ListedLicense) SetDeprecatedVersion(v string) { + o.DeprecatedVersion = v +} +func (o *ListedLicense) GetListVersionAdded() string { + return o.ListVersionAdded +} +func (o *ListedLicense) SetListVersionAdded(v string) { + o.ListVersionAdded = v +} + +type IOrLaterOperator interface { + IExtendableLicense + + // GetSubjectLicense a License participating in an 'or later' model. + GetSubjectLicense() ILicense + + SetSubjectLicense(ILicense) +} + +type OrLaterOperator struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/OrLaterOperator" iri-compact:"expandedlicensing_OrLaterOperator" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // SubjectLicense a License participating in an 'or later' model. + SubjectLicense ILicense `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/subjectLicense" iri-compact:"expandedlicensing_subjectLicense"` +} + +func NewOrLaterOperator() IOrLaterOperator { + return &OrLaterOperator{} +} + +func (o *OrLaterOperator) GetSpdxId() string { + return o.SpdxId +} +func (o *OrLaterOperator) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *OrLaterOperator) GetComment() string { + return o.Comment +} +func (o *OrLaterOperator) SetComment(v string) { + o.Comment = v +} +func (o *OrLaterOperator) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *OrLaterOperator) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *OrLaterOperator) GetDescription() string { + return o.Description +} +func (o *OrLaterOperator) SetDescription(v string) { + o.Description = v +} +func (o *OrLaterOperator) GetExtensions() []IExtension { + return o.Extensions +} +func (o *OrLaterOperator) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *OrLaterOperator) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *OrLaterOperator) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *OrLaterOperator) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *OrLaterOperator) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *OrLaterOperator) GetName() string { + return o.Name +} +func (o *OrLaterOperator) SetName(v string) { + o.Name = v +} +func (o *OrLaterOperator) GetSummary() string { + return o.Summary +} +func (o *OrLaterOperator) SetSummary(v string) { + o.Summary = v +} +func (o *OrLaterOperator) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *OrLaterOperator) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *OrLaterOperator) GetSubjectLicense() ILicense { + return o.SubjectLicense +} +func (o *OrLaterOperator) SetSubjectLicense(v ILicense) { + o.SubjectLicense = v +} + +type IWithAdditionOperator interface { + IAnyLicenseInfo + + // GetSubjectAddition a LicenseAddition participating in a 'with addition' model. + GetSubjectAddition() ILicenseAddition + + SetSubjectAddition(ILicenseAddition) + + // GetSubjectExtendableLicense a License participating in a 'with addition' model. + GetSubjectExtendableLicense() IExtendableLicense + + SetSubjectExtendableLicense(IExtendableLicense) +} + +type WithAdditionOperator struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/WithAdditionOperator" iri-compact:"expandedlicensing_WithAdditionOperator" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // SubjectAddition a LicenseAddition participating in a 'with addition' model. + SubjectAddition ILicenseAddition `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/subjectAddition" iri-compact:"expandedlicensing_subjectAddition"` + // SubjectExtendableLicense a License participating in a 'with addition' model. + SubjectExtendableLicense IExtendableLicense `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/subjectExtendableLicense" iri-compact:"expandedlicensing_subjectExtendableLicense"` +} + +func NewWithAdditionOperator() IWithAdditionOperator { + return &WithAdditionOperator{} +} + +func (o *WithAdditionOperator) GetSpdxId() string { + return o.SpdxId +} +func (o *WithAdditionOperator) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *WithAdditionOperator) GetComment() string { + return o.Comment +} +func (o *WithAdditionOperator) SetComment(v string) { + o.Comment = v +} +func (o *WithAdditionOperator) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *WithAdditionOperator) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *WithAdditionOperator) GetDescription() string { + return o.Description +} +func (o *WithAdditionOperator) SetDescription(v string) { + o.Description = v +} +func (o *WithAdditionOperator) GetExtensions() []IExtension { + return o.Extensions +} +func (o *WithAdditionOperator) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *WithAdditionOperator) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *WithAdditionOperator) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *WithAdditionOperator) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *WithAdditionOperator) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *WithAdditionOperator) GetName() string { + return o.Name +} +func (o *WithAdditionOperator) SetName(v string) { + o.Name = v +} +func (o *WithAdditionOperator) GetSummary() string { + return o.Summary +} +func (o *WithAdditionOperator) SetSummary(v string) { + o.Summary = v +} +func (o *WithAdditionOperator) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *WithAdditionOperator) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *WithAdditionOperator) GetSubjectAddition() ILicenseAddition { + return o.SubjectAddition +} +func (o *WithAdditionOperator) SetSubjectAddition(v ILicenseAddition) { + o.SubjectAddition = v +} +func (o *WithAdditionOperator) GetSubjectExtendableLicense() IExtendableLicense { + return o.SubjectExtendableLicense +} +func (o *WithAdditionOperator) SetSubjectExtendableLicense(v IExtendableLicense) { + o.SubjectExtendableLicense = v +} + +type ICdxPropertiesExtension interface { + IExtension + + // GetCdxProperty provides a map of a property names to a values. + GetCdxProperty() []ICdxPropertyEntry + + SetCdxProperty(...ICdxPropertyEntry) +} + +type CdxPropertiesExtension struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/CdxPropertiesExtension" iri-compact:"extension_CdxPropertiesExtension"` + + Iri string `iri:"@id"` + + // CdxProperty provides a map of a property names to a values. + CdxProperty []ICdxPropertyEntry `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/cdxProperty" iri-compact:"extension_cdxProperty"` +} + +func NewCdxPropertiesExtension() ICdxPropertiesExtension { + return &CdxPropertiesExtension{} +} + +func (o *CdxPropertiesExtension) GetCdxProperty() []ICdxPropertyEntry { + return o.CdxProperty +} +func (o *CdxPropertiesExtension) SetCdxProperty(v ...ICdxPropertyEntry) { + o.CdxProperty = v +} + +type ICvssV2VulnAssessmentRelationship interface { + IVulnAssessmentRelationship + + // GetScore provides a numerical (0-10) representation of the severity of a vulnerability. + GetScore() float64 + + SetScore(float64) + + // GetVectorString specifies the CVSS vector string for a vulnerability. + GetVectorString() string + + SetVectorString(string) +} + +type CvssV2VulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/CvssV2VulnAssessmentRelationship" iri-compact:"security_CvssV2VulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` + + // Score provides a numerical (0-10) representation of the severity of a vulnerability. + Score float64 `iri:"https://spdx.org/rdf/3.0.0/terms/Security/score" iri-compact:"security_score"` + // VectorString specifies the CVSS vector string for a vulnerability. + VectorString string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vectorString" iri-compact:"security_vectorString"` +} + +func NewCvssV2VulnAssessmentRelationship() ICvssV2VulnAssessmentRelationship { + return &CvssV2VulnAssessmentRelationship{} +} + +func (o *CvssV2VulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *CvssV2VulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *CvssV2VulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *CvssV2VulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *CvssV2VulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *CvssV2VulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *CvssV2VulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *CvssV2VulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *CvssV2VulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *CvssV2VulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *CvssV2VulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *CvssV2VulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *CvssV2VulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *CvssV2VulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *CvssV2VulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *CvssV2VulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *CvssV2VulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *CvssV2VulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *CvssV2VulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *CvssV2VulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *CvssV2VulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *CvssV2VulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *CvssV2VulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *CvssV2VulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *CvssV2VulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *CvssV2VulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *CvssV2VulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *CvssV2VulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *CvssV2VulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *CvssV2VulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *CvssV2VulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *CvssV2VulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *CvssV2VulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *CvssV2VulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *CvssV2VulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *CvssV2VulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *CvssV2VulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *CvssV2VulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *CvssV2VulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *CvssV2VulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *CvssV2VulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *CvssV2VulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +func (o *CvssV2VulnAssessmentRelationship) GetScore() float64 { + return o.Score +} +func (o *CvssV2VulnAssessmentRelationship) SetScore(v float64) { + o.Score = v +} +func (o *CvssV2VulnAssessmentRelationship) GetVectorString() string { + return o.VectorString +} +func (o *CvssV2VulnAssessmentRelationship) SetVectorString(v string) { + o.VectorString = v +} + +type ICvssV3VulnAssessmentRelationship interface { + IVulnAssessmentRelationship + + // GetScore provides a numerical (0-10) representation of the severity of a vulnerability. + GetScore() float64 + + SetScore(float64) + + // GetSeverity specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. + GetSeverity() CvssSeverityType + + SetSeverity(CvssSeverityType) + + // GetVectorString specifies the CVSS vector string for a vulnerability. + GetVectorString() string + + SetVectorString(string) +} + +type CvssV3VulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/CvssV3VulnAssessmentRelationship" iri-compact:"security_CvssV3VulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` + + // Score provides a numerical (0-10) representation of the severity of a vulnerability. + Score float64 `iri:"https://spdx.org/rdf/3.0.0/terms/Security/score" iri-compact:"security_score"` + // Severity specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. + Severity CvssSeverityType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/severity" iri-compact:"security_severity"` + // VectorString specifies the CVSS vector string for a vulnerability. + VectorString string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vectorString" iri-compact:"security_vectorString"` +} + +func NewCvssV3VulnAssessmentRelationship() ICvssV3VulnAssessmentRelationship { + return &CvssV3VulnAssessmentRelationship{} +} + +func (o *CvssV3VulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *CvssV3VulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *CvssV3VulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *CvssV3VulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *CvssV3VulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *CvssV3VulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *CvssV3VulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *CvssV3VulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *CvssV3VulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *CvssV3VulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *CvssV3VulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *CvssV3VulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *CvssV3VulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *CvssV3VulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *CvssV3VulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *CvssV3VulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *CvssV3VulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *CvssV3VulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *CvssV3VulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *CvssV3VulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *CvssV3VulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *CvssV3VulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *CvssV3VulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *CvssV3VulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *CvssV3VulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *CvssV3VulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *CvssV3VulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *CvssV3VulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *CvssV3VulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *CvssV3VulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *CvssV3VulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *CvssV3VulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *CvssV3VulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *CvssV3VulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *CvssV3VulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *CvssV3VulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *CvssV3VulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *CvssV3VulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *CvssV3VulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *CvssV3VulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *CvssV3VulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *CvssV3VulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +func (o *CvssV3VulnAssessmentRelationship) GetScore() float64 { + return o.Score +} +func (o *CvssV3VulnAssessmentRelationship) SetScore(v float64) { + o.Score = v +} +func (o *CvssV3VulnAssessmentRelationship) GetSeverity() CvssSeverityType { + return o.Severity +} +func (o *CvssV3VulnAssessmentRelationship) SetSeverity(v CvssSeverityType) { + o.Severity = v +} +func (o *CvssV3VulnAssessmentRelationship) GetVectorString() string { + return o.VectorString +} +func (o *CvssV3VulnAssessmentRelationship) SetVectorString(v string) { + o.VectorString = v +} + +type ICvssV4VulnAssessmentRelationship interface { + IVulnAssessmentRelationship + + // GetScore provides a numerical (0-10) representation of the severity of a vulnerability. + GetScore() float64 + + SetScore(float64) + + // GetSeverity specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. + GetSeverity() CvssSeverityType + + SetSeverity(CvssSeverityType) + + // GetVectorString specifies the CVSS vector string for a vulnerability. + GetVectorString() string + + SetVectorString(string) +} + +type CvssV4VulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/CvssV4VulnAssessmentRelationship" iri-compact:"security_CvssV4VulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` + + // Score provides a numerical (0-10) representation of the severity of a vulnerability. + Score float64 `iri:"https://spdx.org/rdf/3.0.0/terms/Security/score" iri-compact:"security_score"` + // Severity specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. + Severity CvssSeverityType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/severity" iri-compact:"security_severity"` + // VectorString specifies the CVSS vector string for a vulnerability. + VectorString string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vectorString" iri-compact:"security_vectorString"` +} + +func NewCvssV4VulnAssessmentRelationship() ICvssV4VulnAssessmentRelationship { + return &CvssV4VulnAssessmentRelationship{} +} + +func (o *CvssV4VulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *CvssV4VulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *CvssV4VulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *CvssV4VulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *CvssV4VulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *CvssV4VulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *CvssV4VulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *CvssV4VulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *CvssV4VulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *CvssV4VulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *CvssV4VulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *CvssV4VulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *CvssV4VulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *CvssV4VulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *CvssV4VulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *CvssV4VulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *CvssV4VulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *CvssV4VulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *CvssV4VulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *CvssV4VulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *CvssV4VulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *CvssV4VulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *CvssV4VulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *CvssV4VulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *CvssV4VulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *CvssV4VulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *CvssV4VulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *CvssV4VulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *CvssV4VulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *CvssV4VulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *CvssV4VulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *CvssV4VulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *CvssV4VulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *CvssV4VulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *CvssV4VulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *CvssV4VulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *CvssV4VulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *CvssV4VulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *CvssV4VulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *CvssV4VulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *CvssV4VulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *CvssV4VulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +func (o *CvssV4VulnAssessmentRelationship) GetScore() float64 { + return o.Score +} +func (o *CvssV4VulnAssessmentRelationship) SetScore(v float64) { + o.Score = v +} +func (o *CvssV4VulnAssessmentRelationship) GetSeverity() CvssSeverityType { + return o.Severity +} +func (o *CvssV4VulnAssessmentRelationship) SetSeverity(v CvssSeverityType) { + o.Severity = v +} +func (o *CvssV4VulnAssessmentRelationship) GetVectorString() string { + return o.VectorString +} +func (o *CvssV4VulnAssessmentRelationship) SetVectorString(v string) { + o.VectorString = v +} + +type IEpssVulnAssessmentRelationship interface { + IVulnAssessmentRelationship + + // GetPercentile the percentile of the current probability score. + GetPercentile() float64 + + SetPercentile(float64) + + // GetProbability a probability score between 0 and 1 of a vulnerability being exploited. + GetProbability() float64 + + SetProbability(float64) +} + +type EpssVulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/EpssVulnAssessmentRelationship" iri-compact:"security_EpssVulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` + + // Percentile the percentile of the current probability score. + Percentile float64 `iri:"https://spdx.org/rdf/3.0.0/terms/Security/percentile" iri-compact:"security_percentile"` + // Probability a probability score between 0 and 1 of a vulnerability being exploited. + Probability float64 `iri:"https://spdx.org/rdf/3.0.0/terms/Security/probability" iri-compact:"security_probability"` +} + +func NewEpssVulnAssessmentRelationship() IEpssVulnAssessmentRelationship { + return &EpssVulnAssessmentRelationship{} +} + +func (o *EpssVulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *EpssVulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *EpssVulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *EpssVulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *EpssVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *EpssVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *EpssVulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *EpssVulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *EpssVulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *EpssVulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *EpssVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *EpssVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *EpssVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *EpssVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *EpssVulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *EpssVulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *EpssVulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *EpssVulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *EpssVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *EpssVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *EpssVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *EpssVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *EpssVulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *EpssVulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *EpssVulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *EpssVulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *EpssVulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *EpssVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *EpssVulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *EpssVulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *EpssVulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *EpssVulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *EpssVulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *EpssVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *EpssVulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *EpssVulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *EpssVulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *EpssVulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *EpssVulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *EpssVulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *EpssVulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *EpssVulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +func (o *EpssVulnAssessmentRelationship) GetPercentile() float64 { + return o.Percentile +} +func (o *EpssVulnAssessmentRelationship) SetPercentile(v float64) { + o.Percentile = v +} +func (o *EpssVulnAssessmentRelationship) GetProbability() float64 { + return o.Probability +} +func (o *EpssVulnAssessmentRelationship) SetProbability(v float64) { + o.Probability = v +} + +type IExploitCatalogVulnAssessmentRelationship interface { + IVulnAssessmentRelationship + + // GetCatalogType specifies the exploit catalog type. + GetCatalogType() ExploitCatalogType + + SetCatalogType(ExploitCatalogType) + + // GetExploited describe that a CVE is known to have an exploit because it's been listed in an exploit catalog. + GetExploited() bool + + SetExploited(bool) + + // GetLocator provides the location of an exploit catalog. + GetLocator() string + + SetLocator(string) +} + +type ExploitCatalogVulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogVulnAssessmentRelationship" iri-compact:"security_ExploitCatalogVulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` + + // CatalogType specifies the exploit catalog type. + CatalogType ExploitCatalogType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/catalogType" iri-compact:"security_catalogType"` + // Exploited describe that a CVE is known to have an exploit because it's been listed in an exploit catalog. + Exploited bool `iri:"https://spdx.org/rdf/3.0.0/terms/Security/exploited" iri-compact:"security_exploited"` + // Locator provides the location of an exploit catalog. + Locator string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/locator" iri-compact:"security_locator"` +} + +func NewExploitCatalogVulnAssessmentRelationship() IExploitCatalogVulnAssessmentRelationship { + return &ExploitCatalogVulnAssessmentRelationship{} +} + +func (o *ExploitCatalogVulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *ExploitCatalogVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *ExploitCatalogVulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +func (o *ExploitCatalogVulnAssessmentRelationship) GetCatalogType() ExploitCatalogType { + return o.CatalogType +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetCatalogType(v ExploitCatalogType) { + o.CatalogType = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetExploited() bool { + return o.Exploited +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetExploited(v bool) { + o.Exploited = v +} +func (o *ExploitCatalogVulnAssessmentRelationship) GetLocator() string { + return o.Locator +} +func (o *ExploitCatalogVulnAssessmentRelationship) SetLocator(v string) { + o.Locator = v +} + +type ISsvcVulnAssessmentRelationship interface { + IVulnAssessmentRelationship + + // GetDecisionType provide the enumeration of possible decisions in the Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree [https://www.cisa.gov/sites/default/files/publications/cisa-ssvc-guide%20508c.pdf](https://www.cisa.gov/sites/default/files/publications/cisa-ssvc-guide%20508c.pdf) + GetDecisionType() SsvcDecisionType + + SetDecisionType(SsvcDecisionType) +} + +type SsvcVulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/SsvcVulnAssessmentRelationship" iri-compact:"security_SsvcVulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` + + // DecisionType provide the enumeration of possible decisions in the Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree [https://www.cisa.gov/sites/default/files/publications/cisa-ssvc-guide%20508c.pdf](https://www.cisa.gov/sites/default/files/publications/cisa-ssvc-guide%20508c.pdf) + DecisionType SsvcDecisionType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/decisionType" iri-compact:"security_decisionType"` +} + +func NewSsvcVulnAssessmentRelationship() ISsvcVulnAssessmentRelationship { + return &SsvcVulnAssessmentRelationship{} +} + +func (o *SsvcVulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *SsvcVulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *SsvcVulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *SsvcVulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *SsvcVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *SsvcVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *SsvcVulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *SsvcVulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *SsvcVulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *SsvcVulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *SsvcVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *SsvcVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *SsvcVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *SsvcVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *SsvcVulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *SsvcVulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *SsvcVulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *SsvcVulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *SsvcVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *SsvcVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *SsvcVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *SsvcVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *SsvcVulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *SsvcVulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *SsvcVulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *SsvcVulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *SsvcVulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *SsvcVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *SsvcVulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *SsvcVulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *SsvcVulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *SsvcVulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *SsvcVulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *SsvcVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *SsvcVulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *SsvcVulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *SsvcVulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *SsvcVulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *SsvcVulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *SsvcVulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *SsvcVulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *SsvcVulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +func (o *SsvcVulnAssessmentRelationship) GetDecisionType() SsvcDecisionType { + return o.DecisionType +} +func (o *SsvcVulnAssessmentRelationship) SetDecisionType(v SsvcDecisionType) { + o.DecisionType = v +} + +type IVexVulnAssessmentRelationship interface { + IVulnAssessmentRelationship + + // GetStatusNotes conveys information about how VEX status was determined. + GetStatusNotes() string + + SetStatusNotes(string) + + // GetVexVersion specifies the version of a VEX statement. + GetVexVersion() string + + SetVexVersion(string) +} + +type VexVulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexVulnAssessmentRelationship" iri-compact:"security_VexVulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` + + // StatusNotes conveys information about how VEX status was determined. + StatusNotes string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/statusNotes" iri-compact:"security_statusNotes"` + // VexVersion specifies the version of a VEX statement. + VexVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vexVersion" iri-compact:"security_vexVersion"` +} + +func (o *VexVulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *VexVulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *VexVulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *VexVulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *VexVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *VexVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *VexVulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *VexVulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *VexVulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *VexVulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *VexVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *VexVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *VexVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *VexVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *VexVulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *VexVulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *VexVulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *VexVulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *VexVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *VexVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *VexVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *VexVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *VexVulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *VexVulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *VexVulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *VexVulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *VexVulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *VexVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *VexVulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *VexVulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *VexVulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *VexVulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *VexVulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *VexVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *VexVulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *VexVulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *VexVulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *VexVulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *VexVulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *VexVulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *VexVulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *VexVulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +func (o *VexVulnAssessmentRelationship) GetStatusNotes() string { + return o.StatusNotes +} +func (o *VexVulnAssessmentRelationship) SetStatusNotes(v string) { + o.StatusNotes = v +} +func (o *VexVulnAssessmentRelationship) GetVexVersion() string { + return o.VexVersion +} +func (o *VexVulnAssessmentRelationship) SetVexVersion(v string) { + o.VexVersion = v +} + +type IVulnerability interface { + IArtifact + + // GetModifiedTime specifies a time when a vulnerability assessment was modified + GetModifiedTime() string + + SetModifiedTime(string) + + // GetPublishedTime specifies the time when a vulnerability was published. + GetPublishedTime() string + + SetPublishedTime(string) + + // GetWithdrawnTime specified the time and date when a vulnerability was withdrawn. + GetWithdrawnTime() string + + SetWithdrawnTime(string) +} + +type Vulnerability struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/Vulnerability" iri-compact:"security_Vulnerability" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // BuiltTime specifies the time an artifact was built. + BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` + // OriginatedBy identifies from where or whom the Element originally came. + OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` + // ReleaseTime specifies the time an artifact was released. + ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` + // StandardName the name of a relevant standard that may apply to an artifact. + StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // SupportLevel specifies the level of support associated with an artifact. + SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` + // ValidUntilTime specifies until when the artifact can be used before its usage needs to be + // reassessed. + ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` + + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` +} + +func NewVulnerability() IVulnerability { + return &Vulnerability{} +} + +func (o *Vulnerability) GetSpdxId() string { + return o.SpdxId +} +func (o *Vulnerability) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Vulnerability) GetComment() string { + return o.Comment +} +func (o *Vulnerability) SetComment(v string) { + o.Comment = v +} +func (o *Vulnerability) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Vulnerability) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Vulnerability) GetDescription() string { + return o.Description +} +func (o *Vulnerability) SetDescription(v string) { + o.Description = v +} +func (o *Vulnerability) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Vulnerability) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Vulnerability) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Vulnerability) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Vulnerability) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Vulnerability) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Vulnerability) GetName() string { + return o.Name +} +func (o *Vulnerability) SetName(v string) { + o.Name = v +} +func (o *Vulnerability) GetSummary() string { + return o.Summary +} +func (o *Vulnerability) SetSummary(v string) { + o.Summary = v +} +func (o *Vulnerability) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Vulnerability) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *Vulnerability) GetBuiltTime() string { + return o.BuiltTime +} +func (o *Vulnerability) SetBuiltTime(v string) { + o.BuiltTime = v +} +func (o *Vulnerability) GetOriginatedBy() []IAgent { + return o.OriginatedBy +} +func (o *Vulnerability) SetOriginatedBy(v ...IAgent) { + o.OriginatedBy = v +} +func (o *Vulnerability) GetReleaseTime() string { + return o.ReleaseTime +} +func (o *Vulnerability) SetReleaseTime(v string) { + o.ReleaseTime = v +} +func (o *Vulnerability) GetStandardName() []string { + return o.StandardName +} +func (o *Vulnerability) SetStandardName(v ...string) { + o.StandardName = v +} +func (o *Vulnerability) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *Vulnerability) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *Vulnerability) GetSupportLevel() []SupportType { + return o.SupportLevel +} +func (o *Vulnerability) SetSupportLevel(v ...SupportType) { + o.SupportLevel = v +} +func (o *Vulnerability) GetValidUntilTime() string { + return o.ValidUntilTime +} +func (o *Vulnerability) SetValidUntilTime(v string) { + o.ValidUntilTime = v +} + +func (o *Vulnerability) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *Vulnerability) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *Vulnerability) GetPublishedTime() string { + return o.PublishedTime +} +func (o *Vulnerability) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *Vulnerability) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *Vulnerability) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +type ISoftwareArtifact interface { + IArtifact + + // GetAdditionalPurpose provides additional purpose information of the software artifact. + GetAdditionalPurpose() []SoftwarePurpose + + SetAdditionalPurpose(...SoftwarePurpose) + + // GetAttributionText provides a place for the SPDX data creator to record acknowledgement text for + // a software Package, File or Snippet. + GetAttributionText() []string + + SetAttributionText(...string) + + // GetContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be + // used for verifying its identity and/or integrity. + GetContentIdentifier() []IContentIdentifier + + SetContentIdentifier(...IContentIdentifier) + + // GetCopyrightText identifies the text of one or more copyright notices for a software Package, + // File or Snippet, if any. + GetCopyrightText() string + + SetCopyrightText(string) + + // GetPrimaryPurpose provides information about the primary purpose of the software artifact. + GetPrimaryPurpose() SoftwarePurpose + + SetPrimaryPurpose(SoftwarePurpose) +} + +type SoftwareArtifact struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/SoftwareArtifact" iri-compact:"software_SoftwareArtifact" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // BuiltTime specifies the time an artifact was built. + BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` + // OriginatedBy identifies from where or whom the Element originally came. + OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` + // ReleaseTime specifies the time an artifact was released. + ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` + // StandardName the name of a relevant standard that may apply to an artifact. + StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // SupportLevel specifies the level of support associated with an artifact. + SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` + // ValidUntilTime specifies until when the artifact can be used before its usage needs to be + // reassessed. + ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` + + // AdditionalPurpose provides additional purpose information of the software artifact. + AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` + // AttributionText provides a place for the SPDX data creator to record acknowledgement text for + // a software Package, File or Snippet. + AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` + // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be + // used for verifying its identity and/or integrity. + ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` + // CopyrightText identifies the text of one or more copyright notices for a software Package, + // File or Snippet, if any. + CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` + // PrimaryPurpose provides information about the primary purpose of the software artifact. + PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` +} + +func (o *SoftwareArtifact) GetSpdxId() string { + return o.SpdxId +} +func (o *SoftwareArtifact) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *SoftwareArtifact) GetComment() string { + return o.Comment +} +func (o *SoftwareArtifact) SetComment(v string) { + o.Comment = v +} +func (o *SoftwareArtifact) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *SoftwareArtifact) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *SoftwareArtifact) GetDescription() string { + return o.Description +} +func (o *SoftwareArtifact) SetDescription(v string) { + o.Description = v +} +func (o *SoftwareArtifact) GetExtensions() []IExtension { + return o.Extensions +} +func (o *SoftwareArtifact) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *SoftwareArtifact) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *SoftwareArtifact) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *SoftwareArtifact) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *SoftwareArtifact) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *SoftwareArtifact) GetName() string { + return o.Name +} +func (o *SoftwareArtifact) SetName(v string) { + o.Name = v +} +func (o *SoftwareArtifact) GetSummary() string { + return o.Summary +} +func (o *SoftwareArtifact) SetSummary(v string) { + o.Summary = v +} +func (o *SoftwareArtifact) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *SoftwareArtifact) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *SoftwareArtifact) GetBuiltTime() string { + return o.BuiltTime +} +func (o *SoftwareArtifact) SetBuiltTime(v string) { + o.BuiltTime = v +} +func (o *SoftwareArtifact) GetOriginatedBy() []IAgent { + return o.OriginatedBy +} +func (o *SoftwareArtifact) SetOriginatedBy(v ...IAgent) { + o.OriginatedBy = v +} +func (o *SoftwareArtifact) GetReleaseTime() string { + return o.ReleaseTime +} +func (o *SoftwareArtifact) SetReleaseTime(v string) { + o.ReleaseTime = v +} +func (o *SoftwareArtifact) GetStandardName() []string { + return o.StandardName +} +func (o *SoftwareArtifact) SetStandardName(v ...string) { + o.StandardName = v +} +func (o *SoftwareArtifact) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *SoftwareArtifact) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *SoftwareArtifact) GetSupportLevel() []SupportType { + return o.SupportLevel +} +func (o *SoftwareArtifact) SetSupportLevel(v ...SupportType) { + o.SupportLevel = v +} +func (o *SoftwareArtifact) GetValidUntilTime() string { + return o.ValidUntilTime +} +func (o *SoftwareArtifact) SetValidUntilTime(v string) { + o.ValidUntilTime = v +} + +func (o *SoftwareArtifact) GetAdditionalPurpose() []SoftwarePurpose { + return o.AdditionalPurpose +} +func (o *SoftwareArtifact) SetAdditionalPurpose(v ...SoftwarePurpose) { + o.AdditionalPurpose = v +} +func (o *SoftwareArtifact) GetAttributionText() []string { + return o.AttributionText +} +func (o *SoftwareArtifact) SetAttributionText(v ...string) { + o.AttributionText = v +} +func (o *SoftwareArtifact) GetContentIdentifier() []IContentIdentifier { + return o.ContentIdentifier +} +func (o *SoftwareArtifact) SetContentIdentifier(v ...IContentIdentifier) { + o.ContentIdentifier = v +} +func (o *SoftwareArtifact) GetCopyrightText() string { + return o.CopyrightText +} +func (o *SoftwareArtifact) SetCopyrightText(v string) { + o.CopyrightText = v +} +func (o *SoftwareArtifact) GetPrimaryPurpose() SoftwarePurpose { + return o.PrimaryPurpose +} +func (o *SoftwareArtifact) SetPrimaryPurpose(v SoftwarePurpose) { + o.PrimaryPurpose = v +} + +type IBom interface { + IBundle +} + +type Bom struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Bom" iri-compact:"Bom" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Elements refers to one or more Elements that are part of an ElementCollection. + Elements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/element" iri-compact:"element"` + // ProfileConformance describes one a profile which the creator of this ElementCollection intends to + // conform to. + ProfileConformance []ProfileIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/profileConformance" iri-compact:"profileConformance"` + // RootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. + RootElements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/rootElement" iri-compact:"rootElement"` + + // Context gives information about the circumstances or unifying properties + // that Elements of the bundle have been assembled under. + Context string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/context" iri-compact:"context"` +} + +func NewBom() IBom { + return &Bom{} +} + +func (o *Bom) GetSpdxId() string { + return o.SpdxId +} +func (o *Bom) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Bom) GetComment() string { + return o.Comment +} +func (o *Bom) SetComment(v string) { + o.Comment = v +} +func (o *Bom) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Bom) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Bom) GetDescription() string { + return o.Description +} +func (o *Bom) SetDescription(v string) { + o.Description = v +} +func (o *Bom) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Bom) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Bom) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Bom) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Bom) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Bom) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Bom) GetName() string { + return o.Name +} +func (o *Bom) SetName(v string) { + o.Name = v +} +func (o *Bom) GetSummary() string { + return o.Summary +} +func (o *Bom) SetSummary(v string) { + o.Summary = v +} +func (o *Bom) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Bom) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *Bom) GetElements() []IElement { + return o.Elements +} +func (o *Bom) SetElements(v ...IElement) { + o.Elements = v +} +func (o *Bom) GetProfileConformance() []ProfileIdentifierType { + return o.ProfileConformance +} +func (o *Bom) SetProfileConformance(v ...ProfileIdentifierType) { + o.ProfileConformance = v +} +func (o *Bom) GetRootElements() []IElement { + return o.RootElements +} +func (o *Bom) SetRootElements(v ...IElement) { + o.RootElements = v +} + +func (o *Bom) GetContext() string { + return o.Context +} +func (o *Bom) SetContext(v string) { + o.Context = v +} + +type ICustomLicense interface { + ILicense +} + +type CustomLicense struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/CustomLicense" iri-compact:"expandedlicensing_CustomLicense" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // IsDeprecatedLicenseId specifies whether a license or additional text identifier has been marked as + // deprecated. + IsDeprecatedLicenseId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedLicenseId" iri-compact:"expandedlicensing_isDeprecatedLicenseId"` + // IsFsfLibre specifies whether the License is listed as free by the + // [Free Software Foundation (FSF)](https://fsf.org). + IsFsfLibre bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isFsfLibre" iri-compact:"expandedlicensing_isFsfLibre"` + // IsOsiApproved specifies whether the License is listed as approved by the + // [Open Source Initiative (OSI)](https://opensource.org). + IsOsiApproved bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isOsiApproved" iri-compact:"expandedlicensing_isOsiApproved"` + // LicenseXml identifies all the text and metadata associated with a license in the license + // XML format. + LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` + // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated + // License or LicenseAddition. + ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` + // SeeAlso contains a URL where the License or LicenseAddition can be found in use. + SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` + // StandardLicenseHeader provides a License author's preferred text to indicate that a file is covered + // by the License. + StandardLicenseHeader string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseHeader" iri-compact:"expandedlicensing_standardLicenseHeader"` + // StandardLicenseTemplate identifies the full text of a License, in SPDX templating format. + StandardLicenseTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseTemplate" iri-compact:"expandedlicensing_standardLicenseTemplate"` + // LicenseText identifies the full text of a License or Addition. + LicenseText string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` +} + +func NewCustomLicense() ICustomLicense { + return &CustomLicense{} +} + +func (o *CustomLicense) GetSpdxId() string { + return o.SpdxId +} +func (o *CustomLicense) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *CustomLicense) GetComment() string { + return o.Comment +} +func (o *CustomLicense) SetComment(v string) { + o.Comment = v +} +func (o *CustomLicense) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *CustomLicense) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *CustomLicense) GetDescription() string { + return o.Description +} +func (o *CustomLicense) SetDescription(v string) { + o.Description = v +} +func (o *CustomLicense) GetExtensions() []IExtension { + return o.Extensions +} +func (o *CustomLicense) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *CustomLicense) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *CustomLicense) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *CustomLicense) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *CustomLicense) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *CustomLicense) GetName() string { + return o.Name +} +func (o *CustomLicense) SetName(v string) { + o.Name = v +} +func (o *CustomLicense) GetSummary() string { + return o.Summary +} +func (o *CustomLicense) SetSummary(v string) { + o.Summary = v +} +func (o *CustomLicense) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *CustomLicense) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *CustomLicense) GetIsDeprecatedLicenseId() bool { + return o.IsDeprecatedLicenseId +} +func (o *CustomLicense) SetIsDeprecatedLicenseId(v bool) { + o.IsDeprecatedLicenseId = v +} +func (o *CustomLicense) GetIsFsfLibre() bool { + return o.IsFsfLibre +} +func (o *CustomLicense) SetIsFsfLibre(v bool) { + o.IsFsfLibre = v +} +func (o *CustomLicense) GetIsOsiApproved() bool { + return o.IsOsiApproved +} +func (o *CustomLicense) SetIsOsiApproved(v bool) { + o.IsOsiApproved = v +} +func (o *CustomLicense) GetLicenseXml() string { + return o.LicenseXml +} +func (o *CustomLicense) SetLicenseXml(v string) { + o.LicenseXml = v +} +func (o *CustomLicense) GetObsoletedBy() string { + return o.ObsoletedBy +} +func (o *CustomLicense) SetObsoletedBy(v string) { + o.ObsoletedBy = v +} +func (o *CustomLicense) GetSeeAlso() []string { + return o.SeeAlso +} +func (o *CustomLicense) SetSeeAlso(v ...string) { + o.SeeAlso = v +} +func (o *CustomLicense) GetStandardLicenseHeader() string { + return o.StandardLicenseHeader +} +func (o *CustomLicense) SetStandardLicenseHeader(v string) { + o.StandardLicenseHeader = v +} +func (o *CustomLicense) GetStandardLicenseTemplate() string { + return o.StandardLicenseTemplate +} +func (o *CustomLicense) SetStandardLicenseTemplate(v string) { + o.StandardLicenseTemplate = v +} +func (o *CustomLicense) GetLicenseText() string { + return o.LicenseText +} +func (o *CustomLicense) SetLicenseText(v string) { + o.LicenseText = v +} + +type IVexAffectedVulnAssessmentRelationship interface { + IVexVulnAssessmentRelationship + + // GetActionStatement provides advise on how to mitigate or remediate a vulnerability when a VEX product + // is affected by it. + GetActionStatement() string + + SetActionStatement(string) + + // GetActionStatementTime records the time when a recommended action was communicated in a VEX statement + // to mitigate a vulnerability. + GetActionStatementTime() []string + + SetActionStatementTime(...string) +} + +type VexAffectedVulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexAffectedVulnAssessmentRelationship" iri-compact:"security_VexAffectedVulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` + + // StatusNotes conveys information about how VEX status was determined. + StatusNotes string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/statusNotes" iri-compact:"security_statusNotes"` + // VexVersion specifies the version of a VEX statement. + VexVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vexVersion" iri-compact:"security_vexVersion"` + + // ActionStatement provides advise on how to mitigate or remediate a vulnerability when a VEX product + // is affected by it. + ActionStatement string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/actionStatement" iri-compact:"security_actionStatement"` + // ActionStatementTime records the time when a recommended action was communicated in a VEX statement + // to mitigate a vulnerability. + ActionStatementTime []string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/actionStatementTime" iri-compact:"security_actionStatementTime"` +} + +func NewVexAffectedVulnAssessmentRelationship() IVexAffectedVulnAssessmentRelationship { + return &VexAffectedVulnAssessmentRelationship{} +} + +func (o *VexAffectedVulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *VexAffectedVulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *VexAffectedVulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *VexAffectedVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *VexAffectedVulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *VexAffectedVulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *VexAffectedVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *VexAffectedVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *VexAffectedVulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *VexAffectedVulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *VexAffectedVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *VexAffectedVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *VexAffectedVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *VexAffectedVulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *VexAffectedVulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *VexAffectedVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *VexAffectedVulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *VexAffectedVulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *VexAffectedVulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *VexAffectedVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *VexAffectedVulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *VexAffectedVulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *VexAffectedVulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *VexAffectedVulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +func (o *VexAffectedVulnAssessmentRelationship) GetStatusNotes() string { + return o.StatusNotes +} +func (o *VexAffectedVulnAssessmentRelationship) SetStatusNotes(v string) { + o.StatusNotes = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetVexVersion() string { + return o.VexVersion +} +func (o *VexAffectedVulnAssessmentRelationship) SetVexVersion(v string) { + o.VexVersion = v +} + +func (o *VexAffectedVulnAssessmentRelationship) GetActionStatement() string { + return o.ActionStatement +} +func (o *VexAffectedVulnAssessmentRelationship) SetActionStatement(v string) { + o.ActionStatement = v +} +func (o *VexAffectedVulnAssessmentRelationship) GetActionStatementTime() []string { + return o.ActionStatementTime +} +func (o *VexAffectedVulnAssessmentRelationship) SetActionStatementTime(v ...string) { + o.ActionStatementTime = v +} + +type IVexFixedVulnAssessmentRelationship interface { + IVexVulnAssessmentRelationship +} + +type VexFixedVulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexFixedVulnAssessmentRelationship" iri-compact:"security_VexFixedVulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` + + // StatusNotes conveys information about how VEX status was determined. + StatusNotes string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/statusNotes" iri-compact:"security_statusNotes"` + // VexVersion specifies the version of a VEX statement. + VexVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vexVersion" iri-compact:"security_vexVersion"` +} + +func NewVexFixedVulnAssessmentRelationship() IVexFixedVulnAssessmentRelationship { + return &VexFixedVulnAssessmentRelationship{} +} + +func (o *VexFixedVulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *VexFixedVulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *VexFixedVulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *VexFixedVulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *VexFixedVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *VexFixedVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *VexFixedVulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *VexFixedVulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *VexFixedVulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *VexFixedVulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *VexFixedVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *VexFixedVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *VexFixedVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *VexFixedVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *VexFixedVulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *VexFixedVulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *VexFixedVulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *VexFixedVulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *VexFixedVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *VexFixedVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *VexFixedVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *VexFixedVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *VexFixedVulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *VexFixedVulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *VexFixedVulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *VexFixedVulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *VexFixedVulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *VexFixedVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *VexFixedVulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *VexFixedVulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *VexFixedVulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *VexFixedVulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *VexFixedVulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *VexFixedVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *VexFixedVulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *VexFixedVulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *VexFixedVulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *VexFixedVulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *VexFixedVulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *VexFixedVulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *VexFixedVulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *VexFixedVulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +func (o *VexFixedVulnAssessmentRelationship) GetStatusNotes() string { + return o.StatusNotes +} +func (o *VexFixedVulnAssessmentRelationship) SetStatusNotes(v string) { + o.StatusNotes = v +} +func (o *VexFixedVulnAssessmentRelationship) GetVexVersion() string { + return o.VexVersion +} +func (o *VexFixedVulnAssessmentRelationship) SetVexVersion(v string) { + o.VexVersion = v +} + +type IVexNotAffectedVulnAssessmentRelationship interface { + IVexVulnAssessmentRelationship + + // GetImpactStatement explains why a VEX product is not affected by a vulnerability. It is an + // alternative in VexNotAffectedVulnAssessmentRelationship to the machine-readable + // justification label. + GetImpactStatement() string + + SetImpactStatement(string) + + // GetImpactStatementTime timestamp of impact statement. + GetImpactStatementTime() string + + SetImpactStatementTime(string) + + // GetJustificationType impact justification label to be used when linking a vulnerability to an element + // representing a VEX product with a VexNotAffectedVulnAssessmentRelationship + // relationship. + GetJustificationType() VexJustificationType + + SetJustificationType(VexJustificationType) +} + +type VexNotAffectedVulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexNotAffectedVulnAssessmentRelationship" iri-compact:"security_VexNotAffectedVulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` + + // StatusNotes conveys information about how VEX status was determined. + StatusNotes string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/statusNotes" iri-compact:"security_statusNotes"` + // VexVersion specifies the version of a VEX statement. + VexVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vexVersion" iri-compact:"security_vexVersion"` + + // ImpactStatement explains why a VEX product is not affected by a vulnerability. It is an + // alternative in VexNotAffectedVulnAssessmentRelationship to the machine-readable + // justification label. + ImpactStatement string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/impactStatement" iri-compact:"security_impactStatement"` + // ImpactStatementTime timestamp of impact statement. + ImpactStatementTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/impactStatementTime" iri-compact:"security_impactStatementTime"` + // JustificationType impact justification label to be used when linking a vulnerability to an element + // representing a VEX product with a VexNotAffectedVulnAssessmentRelationship + // relationship. + JustificationType VexJustificationType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/justificationType" iri-compact:"security_justificationType"` +} + +func NewVexNotAffectedVulnAssessmentRelationship() IVexNotAffectedVulnAssessmentRelationship { + return &VexNotAffectedVulnAssessmentRelationship{} +} + +func (o *VexNotAffectedVulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *VexNotAffectedVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *VexNotAffectedVulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +func (o *VexNotAffectedVulnAssessmentRelationship) GetStatusNotes() string { + return o.StatusNotes +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetStatusNotes(v string) { + o.StatusNotes = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetVexVersion() string { + return o.VexVersion +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetVexVersion(v string) { + o.VexVersion = v +} + +func (o *VexNotAffectedVulnAssessmentRelationship) GetImpactStatement() string { + return o.ImpactStatement +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetImpactStatement(v string) { + o.ImpactStatement = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetImpactStatementTime() string { + return o.ImpactStatementTime +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetImpactStatementTime(v string) { + o.ImpactStatementTime = v +} +func (o *VexNotAffectedVulnAssessmentRelationship) GetJustificationType() VexJustificationType { + return o.JustificationType +} +func (o *VexNotAffectedVulnAssessmentRelationship) SetJustificationType(v VexJustificationType) { + o.JustificationType = v +} + +type IVexUnderInvestigationVulnAssessmentRelationship interface { + IVexVulnAssessmentRelationship +} + +type VexUnderInvestigationVulnAssessmentRelationship struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexUnderInvestigationVulnAssessmentRelationship" iri-compact:"security_VexUnderInvestigationVulnAssessmentRelationship" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Completeness provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` + // EndTime specifies the time from which an element is no longer applicable / valid. + EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` + // From references the Element on the left-hand side of a relationship. + From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` + // RelationshipType information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` + // StartTime specifies the time from which an element is applicable / valid. + StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` + // To references an Element on the right-hand side of a relationship. + To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // AssessedElement specifies an Element contained in a piece of software where a vulnerability was + // found. + AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` + // ModifiedTime specifies a time when a vulnerability assessment was modified + ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` + // PublishedTime specifies the time when a vulnerability was published. + PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` + // WithdrawnTime specified the time and date when a vulnerability was withdrawn. + WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` + + // StatusNotes conveys information about how VEX status was determined. + StatusNotes string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/statusNotes" iri-compact:"security_statusNotes"` + // VexVersion specifies the version of a VEX statement. + VexVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vexVersion" iri-compact:"security_vexVersion"` +} + +func NewVexUnderInvestigationVulnAssessmentRelationship() IVexUnderInvestigationVulnAssessmentRelationship { + return &VexUnderInvestigationVulnAssessmentRelationship{} +} + +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetSpdxId() string { + return o.SpdxId +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetComment() string { + return o.Comment +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetComment(v string) { + o.Comment = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetDescription() string { + return o.Description +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetDescription(v string) { + o.Description = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetExtensions() []IExtension { + return o.Extensions +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetName() string { + return o.Name +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetName(v string) { + o.Name = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetSummary() string { + return o.Summary +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetSummary(v string) { + o.Summary = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { + return o.Completeness +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { + o.Completeness = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetEndTime() string { + return o.EndTime +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetEndTime(v string) { + o.EndTime = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetFrom() IElement { + return o.From +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetFrom(v IElement) { + o.From = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetRelationshipType() RelationshipType { + return o.RelationshipType +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { + o.RelationshipType = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetStartTime() string { + return o.StartTime +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetStartTime(v string) { + o.StartTime = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetTo() []IElement { + return o.To +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetTo(v ...IElement) { + o.To = v +} + +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetAssessedElement() IElement { + return o.AssessedElement +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetAssessedElement(v IElement) { + o.AssessedElement = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetModifiedTime() string { + return o.ModifiedTime +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetModifiedTime(v string) { + o.ModifiedTime = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetPublishedTime() string { + return o.PublishedTime +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetPublishedTime(v string) { + o.PublishedTime = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetWithdrawnTime() string { + return o.WithdrawnTime +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetWithdrawnTime(v string) { + o.WithdrawnTime = v +} + +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetStatusNotes() string { + return o.StatusNotes +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetStatusNotes(v string) { + o.StatusNotes = v +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) GetVexVersion() string { + return o.VexVersion +} +func (o *VexUnderInvestigationVulnAssessmentRelationship) SetVexVersion(v string) { + o.VexVersion = v +} + +type IFile interface { + ISoftwareArtifact + + // GetContentType provides information about the content type of an Element. + GetContentType() string + + SetContentType(string) + + // GetFileKind describes if a given file is a directory or non-directory kind of file. + GetFileKind() FileKindType + + SetFileKind(FileKindType) +} + +type File struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/File" iri-compact:"software_File" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // BuiltTime specifies the time an artifact was built. + BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` + // OriginatedBy identifies from where or whom the Element originally came. + OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` + // ReleaseTime specifies the time an artifact was released. + ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` + // StandardName the name of a relevant standard that may apply to an artifact. + StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // SupportLevel specifies the level of support associated with an artifact. + SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` + // ValidUntilTime specifies until when the artifact can be used before its usage needs to be + // reassessed. + ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` + + // AdditionalPurpose provides additional purpose information of the software artifact. + AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` + // AttributionText provides a place for the SPDX data creator to record acknowledgement text for + // a software Package, File or Snippet. + AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` + // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be + // used for verifying its identity and/or integrity. + ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` + // CopyrightText identifies the text of one or more copyright notices for a software Package, + // File or Snippet, if any. + CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` + // PrimaryPurpose provides information about the primary purpose of the software artifact. + PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` + + // ContentType provides information about the content type of an Element. + ContentType string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentType" iri-compact:"software_contentType"` + // FileKind describes if a given file is a directory or non-directory kind of file. + FileKind FileKindType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/fileKind" iri-compact:"software_fileKind"` +} + +func NewFile() IFile { + return &File{} +} + +func (o *File) GetSpdxId() string { + return o.SpdxId +} +func (o *File) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *File) GetComment() string { + return o.Comment +} +func (o *File) SetComment(v string) { + o.Comment = v +} +func (o *File) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *File) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *File) GetDescription() string { + return o.Description +} +func (o *File) SetDescription(v string) { + o.Description = v +} +func (o *File) GetExtensions() []IExtension { + return o.Extensions +} +func (o *File) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *File) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *File) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *File) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *File) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *File) GetName() string { + return o.Name +} +func (o *File) SetName(v string) { + o.Name = v +} +func (o *File) GetSummary() string { + return o.Summary +} +func (o *File) SetSummary(v string) { + o.Summary = v +} +func (o *File) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *File) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *File) GetBuiltTime() string { + return o.BuiltTime +} +func (o *File) SetBuiltTime(v string) { + o.BuiltTime = v +} +func (o *File) GetOriginatedBy() []IAgent { + return o.OriginatedBy +} +func (o *File) SetOriginatedBy(v ...IAgent) { + o.OriginatedBy = v +} +func (o *File) GetReleaseTime() string { + return o.ReleaseTime +} +func (o *File) SetReleaseTime(v string) { + o.ReleaseTime = v +} +func (o *File) GetStandardName() []string { + return o.StandardName +} +func (o *File) SetStandardName(v ...string) { + o.StandardName = v +} +func (o *File) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *File) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *File) GetSupportLevel() []SupportType { + return o.SupportLevel +} +func (o *File) SetSupportLevel(v ...SupportType) { + o.SupportLevel = v +} +func (o *File) GetValidUntilTime() string { + return o.ValidUntilTime +} +func (o *File) SetValidUntilTime(v string) { + o.ValidUntilTime = v +} + +func (o *File) GetAdditionalPurpose() []SoftwarePurpose { + return o.AdditionalPurpose +} +func (o *File) SetAdditionalPurpose(v ...SoftwarePurpose) { + o.AdditionalPurpose = v +} +func (o *File) GetAttributionText() []string { + return o.AttributionText +} +func (o *File) SetAttributionText(v ...string) { + o.AttributionText = v +} +func (o *File) GetContentIdentifier() []IContentIdentifier { + return o.ContentIdentifier +} +func (o *File) SetContentIdentifier(v ...IContentIdentifier) { + o.ContentIdentifier = v +} +func (o *File) GetCopyrightText() string { + return o.CopyrightText +} +func (o *File) SetCopyrightText(v string) { + o.CopyrightText = v +} +func (o *File) GetPrimaryPurpose() SoftwarePurpose { + return o.PrimaryPurpose +} +func (o *File) SetPrimaryPurpose(v SoftwarePurpose) { + o.PrimaryPurpose = v +} + +func (o *File) GetContentType() string { + return o.ContentType +} +func (o *File) SetContentType(v string) { + o.ContentType = v +} +func (o *File) GetFileKind() FileKindType { + return o.FileKind +} +func (o *File) SetFileKind(v FileKindType) { + o.FileKind = v +} + +type IPackage interface { + ISoftwareArtifact + + // GetDownloadLocation identifies the download Uniform Resource Identifier for the package at the time + // that the document was created. + GetDownloadLocation() string + + SetDownloadLocation(string) + + // GetHomePage a place for the SPDX document creator to record a website that serves as the + // package's home page. + GetHomePage() string + + SetHomePage(string) + + // GetPackageUrl provides a place for the SPDX data creator to record the package URL string + // (in accordance with the + // [package URL spec](https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst)) + // for a software Package. + GetPackageUrl() string + + SetPackageUrl(string) + + // GetPackageVersion identify the version of a package. + GetPackageVersion() string + + SetPackageVersion(string) + + // GetSourceInfo records any relevant background information or additional comments + // about the origin of the package. + GetSourceInfo() string + + SetSourceInfo(string) +} + +type Package struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/Package" iri-compact:"software_Package" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // BuiltTime specifies the time an artifact was built. + BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` + // OriginatedBy identifies from where or whom the Element originally came. + OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` + // ReleaseTime specifies the time an artifact was released. + ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` + // StandardName the name of a relevant standard that may apply to an artifact. + StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // SupportLevel specifies the level of support associated with an artifact. + SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` + // ValidUntilTime specifies until when the artifact can be used before its usage needs to be + // reassessed. + ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` + + // AdditionalPurpose provides additional purpose information of the software artifact. + AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` + // AttributionText provides a place for the SPDX data creator to record acknowledgement text for + // a software Package, File or Snippet. + AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` + // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be + // used for verifying its identity and/or integrity. + ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` + // CopyrightText identifies the text of one or more copyright notices for a software Package, + // File or Snippet, if any. + CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` + // PrimaryPurpose provides information about the primary purpose of the software artifact. + PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` + + // DownloadLocation identifies the download Uniform Resource Identifier for the package at the time + // that the document was created. + DownloadLocation string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/downloadLocation" iri-compact:"software_downloadLocation"` + // HomePage a place for the SPDX document creator to record a website that serves as the + // package's home page. + HomePage string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/homePage" iri-compact:"software_homePage"` + // PackageUrl provides a place for the SPDX data creator to record the package URL string + // (in accordance with the + // [package URL spec](https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst)) + // for a software Package. + PackageUrl string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageUrl" iri-compact:"software_packageUrl"` + // PackageVersion identify the version of a package. + PackageVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageVersion" iri-compact:"software_packageVersion"` + // SourceInfo records any relevant background information or additional comments + // about the origin of the package. + SourceInfo string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/sourceInfo" iri-compact:"software_sourceInfo"` +} + +func NewPackage() IPackage { + return &Package{} +} + +func (o *Package) GetSpdxId() string { + return o.SpdxId +} +func (o *Package) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Package) GetComment() string { + return o.Comment +} +func (o *Package) SetComment(v string) { + o.Comment = v +} +func (o *Package) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Package) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Package) GetDescription() string { + return o.Description +} +func (o *Package) SetDescription(v string) { + o.Description = v +} +func (o *Package) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Package) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Package) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Package) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Package) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Package) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Package) GetName() string { + return o.Name +} +func (o *Package) SetName(v string) { + o.Name = v +} +func (o *Package) GetSummary() string { + return o.Summary +} +func (o *Package) SetSummary(v string) { + o.Summary = v +} +func (o *Package) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Package) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *Package) GetBuiltTime() string { + return o.BuiltTime +} +func (o *Package) SetBuiltTime(v string) { + o.BuiltTime = v +} +func (o *Package) GetOriginatedBy() []IAgent { + return o.OriginatedBy +} +func (o *Package) SetOriginatedBy(v ...IAgent) { + o.OriginatedBy = v +} +func (o *Package) GetReleaseTime() string { + return o.ReleaseTime +} +func (o *Package) SetReleaseTime(v string) { + o.ReleaseTime = v +} +func (o *Package) GetStandardName() []string { + return o.StandardName +} +func (o *Package) SetStandardName(v ...string) { + o.StandardName = v +} +func (o *Package) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *Package) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *Package) GetSupportLevel() []SupportType { + return o.SupportLevel +} +func (o *Package) SetSupportLevel(v ...SupportType) { + o.SupportLevel = v +} +func (o *Package) GetValidUntilTime() string { + return o.ValidUntilTime +} +func (o *Package) SetValidUntilTime(v string) { + o.ValidUntilTime = v +} + +func (o *Package) GetAdditionalPurpose() []SoftwarePurpose { + return o.AdditionalPurpose +} +func (o *Package) SetAdditionalPurpose(v ...SoftwarePurpose) { + o.AdditionalPurpose = v +} +func (o *Package) GetAttributionText() []string { + return o.AttributionText +} +func (o *Package) SetAttributionText(v ...string) { + o.AttributionText = v +} +func (o *Package) GetContentIdentifier() []IContentIdentifier { + return o.ContentIdentifier +} +func (o *Package) SetContentIdentifier(v ...IContentIdentifier) { + o.ContentIdentifier = v +} +func (o *Package) GetCopyrightText() string { + return o.CopyrightText +} +func (o *Package) SetCopyrightText(v string) { + o.CopyrightText = v +} +func (o *Package) GetPrimaryPurpose() SoftwarePurpose { + return o.PrimaryPurpose +} +func (o *Package) SetPrimaryPurpose(v SoftwarePurpose) { + o.PrimaryPurpose = v +} + +func (o *Package) GetDownloadLocation() string { + return o.DownloadLocation +} +func (o *Package) SetDownloadLocation(v string) { + o.DownloadLocation = v +} +func (o *Package) GetHomePage() string { + return o.HomePage +} +func (o *Package) SetHomePage(v string) { + o.HomePage = v +} +func (o *Package) GetPackageUrl() string { + return o.PackageUrl +} +func (o *Package) SetPackageUrl(v string) { + o.PackageUrl = v +} +func (o *Package) GetPackageVersion() string { + return o.PackageVersion +} +func (o *Package) SetPackageVersion(v string) { + o.PackageVersion = v +} +func (o *Package) GetSourceInfo() string { + return o.SourceInfo +} +func (o *Package) SetSourceInfo(v string) { + o.SourceInfo = v +} + +type ISbom interface { + IBom + + // GetSbomType provides information about the type of an SBOM. + GetSbomType() []SbomType + + SetSbomType(...SbomType) +} + +type Sbom struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/Sbom" iri-compact:"software_Sbom" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // Elements refers to one or more Elements that are part of an ElementCollection. + Elements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/element" iri-compact:"element"` + // ProfileConformance describes one a profile which the creator of this ElementCollection intends to + // conform to. + ProfileConformance []ProfileIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/profileConformance" iri-compact:"profileConformance"` + // RootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. + RootElements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/rootElement" iri-compact:"rootElement"` + + // Context gives information about the circumstances or unifying properties + // that Elements of the bundle have been assembled under. + Context string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/context" iri-compact:"context"` + + // SbomType provides information about the type of an SBOM. + SbomType []SbomType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/sbomType" iri-compact:"software_sbomType"` +} + +func NewSbom() ISbom { + return &Sbom{} +} + +func (o *Sbom) GetSpdxId() string { + return o.SpdxId +} +func (o *Sbom) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Sbom) GetComment() string { + return o.Comment +} +func (o *Sbom) SetComment(v string) { + o.Comment = v +} +func (o *Sbom) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Sbom) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Sbom) GetDescription() string { + return o.Description +} +func (o *Sbom) SetDescription(v string) { + o.Description = v +} +func (o *Sbom) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Sbom) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Sbom) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Sbom) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Sbom) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Sbom) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Sbom) GetName() string { + return o.Name +} +func (o *Sbom) SetName(v string) { + o.Name = v +} +func (o *Sbom) GetSummary() string { + return o.Summary +} +func (o *Sbom) SetSummary(v string) { + o.Summary = v +} +func (o *Sbom) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Sbom) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *Sbom) GetElements() []IElement { + return o.Elements +} +func (o *Sbom) SetElements(v ...IElement) { + o.Elements = v +} +func (o *Sbom) GetProfileConformance() []ProfileIdentifierType { + return o.ProfileConformance +} +func (o *Sbom) SetProfileConformance(v ...ProfileIdentifierType) { + o.ProfileConformance = v +} +func (o *Sbom) GetRootElements() []IElement { + return o.RootElements +} +func (o *Sbom) SetRootElements(v ...IElement) { + o.RootElements = v +} + +func (o *Sbom) GetContext() string { + return o.Context +} +func (o *Sbom) SetContext(v string) { + o.Context = v +} + +func (o *Sbom) GetSbomType() []SbomType { + return o.SbomType +} +func (o *Sbom) SetSbomType(v ...SbomType) { + o.SbomType = v +} + +type ISnippet interface { + ISoftwareArtifact + + // GetByteRange defines the byte range in the original host file that the snippet information + // applies to. + GetByteRange() IPositiveIntegerRange + + SetByteRange(IPositiveIntegerRange) + + // GetLineRange defines the line range in the original host file that the snippet information + // applies to. + GetLineRange() IPositiveIntegerRange + + SetLineRange(IPositiveIntegerRange) + + // GetSnippetFromFile defines the original host file that the snippet information applies to. + GetSnippetFromFile() IFile + + SetSnippetFromFile(IFile) +} + +type Snippet struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/Snippet" iri-compact:"software_Snippet" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // BuiltTime specifies the time an artifact was built. + BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` + // OriginatedBy identifies from where or whom the Element originally came. + OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` + // ReleaseTime specifies the time an artifact was released. + ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` + // StandardName the name of a relevant standard that may apply to an artifact. + StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // SupportLevel specifies the level of support associated with an artifact. + SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` + // ValidUntilTime specifies until when the artifact can be used before its usage needs to be + // reassessed. + ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` + + // AdditionalPurpose provides additional purpose information of the software artifact. + AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` + // AttributionText provides a place for the SPDX data creator to record acknowledgement text for + // a software Package, File or Snippet. + AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` + // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be + // used for verifying its identity and/or integrity. + ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` + // CopyrightText identifies the text of one or more copyright notices for a software Package, + // File or Snippet, if any. + CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` + // PrimaryPurpose provides information about the primary purpose of the software artifact. + PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` + + // ByteRange defines the byte range in the original host file that the snippet information + // applies to. + ByteRange IPositiveIntegerRange `iri:"https://spdx.org/rdf/3.0.0/terms/Software/byteRange" iri-compact:"software_byteRange"` + // LineRange defines the line range in the original host file that the snippet information + // applies to. + LineRange IPositiveIntegerRange `iri:"https://spdx.org/rdf/3.0.0/terms/Software/lineRange" iri-compact:"software_lineRange"` + // SnippetFromFile defines the original host file that the snippet information applies to. + SnippetFromFile IFile `iri:"https://spdx.org/rdf/3.0.0/terms/Software/snippetFromFile" iri-compact:"software_snippetFromFile"` +} + +func NewSnippet() ISnippet { + return &Snippet{} +} + +func (o *Snippet) GetSpdxId() string { + return o.SpdxId +} +func (o *Snippet) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *Snippet) GetComment() string { + return o.Comment +} +func (o *Snippet) SetComment(v string) { + o.Comment = v +} +func (o *Snippet) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *Snippet) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *Snippet) GetDescription() string { + return o.Description +} +func (o *Snippet) SetDescription(v string) { + o.Description = v +} +func (o *Snippet) GetExtensions() []IExtension { + return o.Extensions +} +func (o *Snippet) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *Snippet) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *Snippet) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *Snippet) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *Snippet) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *Snippet) GetName() string { + return o.Name +} +func (o *Snippet) SetName(v string) { + o.Name = v +} +func (o *Snippet) GetSummary() string { + return o.Summary +} +func (o *Snippet) SetSummary(v string) { + o.Summary = v +} +func (o *Snippet) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *Snippet) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *Snippet) GetBuiltTime() string { + return o.BuiltTime +} +func (o *Snippet) SetBuiltTime(v string) { + o.BuiltTime = v +} +func (o *Snippet) GetOriginatedBy() []IAgent { + return o.OriginatedBy +} +func (o *Snippet) SetOriginatedBy(v ...IAgent) { + o.OriginatedBy = v +} +func (o *Snippet) GetReleaseTime() string { + return o.ReleaseTime +} +func (o *Snippet) SetReleaseTime(v string) { + o.ReleaseTime = v +} +func (o *Snippet) GetStandardName() []string { + return o.StandardName +} +func (o *Snippet) SetStandardName(v ...string) { + o.StandardName = v +} +func (o *Snippet) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *Snippet) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *Snippet) GetSupportLevel() []SupportType { + return o.SupportLevel +} +func (o *Snippet) SetSupportLevel(v ...SupportType) { + o.SupportLevel = v +} +func (o *Snippet) GetValidUntilTime() string { + return o.ValidUntilTime +} +func (o *Snippet) SetValidUntilTime(v string) { + o.ValidUntilTime = v +} + +func (o *Snippet) GetAdditionalPurpose() []SoftwarePurpose { + return o.AdditionalPurpose +} +func (o *Snippet) SetAdditionalPurpose(v ...SoftwarePurpose) { + o.AdditionalPurpose = v +} +func (o *Snippet) GetAttributionText() []string { + return o.AttributionText +} +func (o *Snippet) SetAttributionText(v ...string) { + o.AttributionText = v +} +func (o *Snippet) GetContentIdentifier() []IContentIdentifier { + return o.ContentIdentifier +} +func (o *Snippet) SetContentIdentifier(v ...IContentIdentifier) { + o.ContentIdentifier = v +} +func (o *Snippet) GetCopyrightText() string { + return o.CopyrightText +} +func (o *Snippet) SetCopyrightText(v string) { + o.CopyrightText = v +} +func (o *Snippet) GetPrimaryPurpose() SoftwarePurpose { + return o.PrimaryPurpose +} +func (o *Snippet) SetPrimaryPurpose(v SoftwarePurpose) { + o.PrimaryPurpose = v +} + +func (o *Snippet) GetByteRange() IPositiveIntegerRange { + return o.ByteRange +} +func (o *Snippet) SetByteRange(v IPositiveIntegerRange) { + o.ByteRange = v +} +func (o *Snippet) GetLineRange() IPositiveIntegerRange { + return o.LineRange +} +func (o *Snippet) SetLineRange(v IPositiveIntegerRange) { + o.LineRange = v +} +func (o *Snippet) GetSnippetFromFile() IFile { + return o.SnippetFromFile +} +func (o *Snippet) SetSnippetFromFile(v IFile) { + o.SnippetFromFile = v +} + +type IAIPackage interface { + IPackage + + // GetAutonomyType states if a human is involved in the decisions of the AI software. + GetAutonomyType() PresenceType + + SetAutonomyType(PresenceType) + + // GetDomain captures the domain in which the AI package can be used. + GetDomain() []string + + SetDomain(...string) + + // GetEnergyConsumption indicates the amount of energy consumed to train the AI model. + GetEnergyConsumption() IEnergyConsumption + + SetEnergyConsumption(IEnergyConsumption) + + // GetHyperparameter records a hyperparameter used to build the AI model contained in the AI + // package. + GetHyperparameter() []IDictionaryEntry + + SetHyperparameter(...IDictionaryEntry) + + // GetInformationAboutApplication provides relevant information about the AI software, not including the model + // description. + GetInformationAboutApplication() string + + SetInformationAboutApplication(string) + + // GetInformationAboutTraining describes relevant information about different steps of the training process. + GetInformationAboutTraining() string + + SetInformationAboutTraining(string) + + // GetLimitation captures a limitation of the AI software. + GetLimitation() string + + SetLimitation(string) + + // GetMetric records the measurement of prediction quality of the AI model. + GetMetric() []IDictionaryEntry + + SetMetric(...IDictionaryEntry) + + // GetMetricDecisionThreshold captures the threshold that was used for computation of a metric described in + // the metric field. + GetMetricDecisionThreshold() []IDictionaryEntry + + SetMetricDecisionThreshold(...IDictionaryEntry) + + // GetModelDataPreprocessing describes all the preprocessing steps applied to the training data before the + // model training. + GetModelDataPreprocessing() []string + + SetModelDataPreprocessing(...string) + + // GetModelExplainability describes methods that can be used to explain the model. + GetModelExplainability() []string + + SetModelExplainability(...string) + + // GetSafetyRiskAssessment records the results of general safety risk assessment of the AI system. + GetSafetyRiskAssessment() SafetyRiskAssessmentType + + SetSafetyRiskAssessment(SafetyRiskAssessmentType) + + // GetStandardCompliance captures a standard that is being complied with. + GetStandardCompliance() []string + + SetStandardCompliance(...string) + + // GetTypeOfModel records the type of the model used in the AI software. + GetTypeOfModel() []string + + SetTypeOfModel(...string) + + // GetUseSensitivePersonalInformation records if sensitive personal information is used during model training or + // could be used during the inference. + GetUseSensitivePersonalInformation() PresenceType + + SetUseSensitivePersonalInformation(PresenceType) +} + +type AIPackage struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/AIPackage" iri-compact:"ai_AIPackage" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // BuiltTime specifies the time an artifact was built. + BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` + // OriginatedBy identifies from where or whom the Element originally came. + OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` + // ReleaseTime specifies the time an artifact was released. + ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` + // StandardName the name of a relevant standard that may apply to an artifact. + StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // SupportLevel specifies the level of support associated with an artifact. + SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` + // ValidUntilTime specifies until when the artifact can be used before its usage needs to be + // reassessed. + ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` + + // AdditionalPurpose provides additional purpose information of the software artifact. + AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` + // AttributionText provides a place for the SPDX data creator to record acknowledgement text for + // a software Package, File or Snippet. + AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` + // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be + // used for verifying its identity and/or integrity. + ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` + // CopyrightText identifies the text of one or more copyright notices for a software Package, + // File or Snippet, if any. + CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` + // PrimaryPurpose provides information about the primary purpose of the software artifact. + PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` + + // DownloadLocation identifies the download Uniform Resource Identifier for the package at the time + // that the document was created. + DownloadLocation string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/downloadLocation" iri-compact:"software_downloadLocation"` + // HomePage a place for the SPDX document creator to record a website that serves as the + // package's home page. + HomePage string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/homePage" iri-compact:"software_homePage"` + // PackageUrl provides a place for the SPDX data creator to record the package URL string + // (in accordance with the + // [package URL spec](https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst)) + // for a software Package. + PackageUrl string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageUrl" iri-compact:"software_packageUrl"` + // PackageVersion identify the version of a package. + PackageVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageVersion" iri-compact:"software_packageVersion"` + // SourceInfo records any relevant background information or additional comments + // about the origin of the package. + SourceInfo string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/sourceInfo" iri-compact:"software_sourceInfo"` + + // AutonomyType states if a human is involved in the decisions of the AI software. + AutonomyType PresenceType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/autonomyType" iri-compact:"ai_autonomyType"` + // Domain captures the domain in which the AI package can be used. + Domain []string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/domain" iri-compact:"ai_domain"` + // EnergyConsumption indicates the amount of energy consumed to train the AI model. + EnergyConsumption IEnergyConsumption `iri:"https://spdx.org/rdf/3.0.0/terms/AI/energyConsumption" iri-compact:"ai_energyConsumption"` + // Hyperparameter records a hyperparameter used to build the AI model contained in the AI + // package. + Hyperparameter []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/AI/hyperparameter" iri-compact:"ai_hyperparameter"` + // InformationAboutApplication provides relevant information about the AI software, not including the model + // description. + InformationAboutApplication string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/informationAboutApplication" iri-compact:"ai_informationAboutApplication"` + // InformationAboutTraining describes relevant information about different steps of the training process. + InformationAboutTraining string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/informationAboutTraining" iri-compact:"ai_informationAboutTraining"` + // Limitation captures a limitation of the AI software. + Limitation string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/limitation" iri-compact:"ai_limitation"` + // Metric records the measurement of prediction quality of the AI model. + Metric []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/AI/metric" iri-compact:"ai_metric"` + // MetricDecisionThreshold captures the threshold that was used for computation of a metric described in + // the metric field. + MetricDecisionThreshold []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/AI/metricDecisionThreshold" iri-compact:"ai_metricDecisionThreshold"` + // ModelDataPreprocessing describes all the preprocessing steps applied to the training data before the + // model training. + ModelDataPreprocessing []string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/modelDataPreprocessing" iri-compact:"ai_modelDataPreprocessing"` + // ModelExplainability describes methods that can be used to explain the model. + ModelExplainability []string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/modelExplainability" iri-compact:"ai_modelExplainability"` + // SafetyRiskAssessment records the results of general safety risk assessment of the AI system. + SafetyRiskAssessment SafetyRiskAssessmentType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/safetyRiskAssessment" iri-compact:"ai_safetyRiskAssessment"` + // StandardCompliance captures a standard that is being complied with. + StandardCompliance []string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/standardCompliance" iri-compact:"ai_standardCompliance"` + // TypeOfModel records the type of the model used in the AI software. + TypeOfModel []string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/typeOfModel" iri-compact:"ai_typeOfModel"` + // UseSensitivePersonalInformation records if sensitive personal information is used during model training or + // could be used during the inference. + UseSensitivePersonalInformation PresenceType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/useSensitivePersonalInformation" iri-compact:"ai_useSensitivePersonalInformation"` +} + +func NewAIPackage() IAIPackage { + return &AIPackage{} +} + +func (o *AIPackage) GetSpdxId() string { + return o.SpdxId +} +func (o *AIPackage) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *AIPackage) GetComment() string { + return o.Comment +} +func (o *AIPackage) SetComment(v string) { + o.Comment = v +} +func (o *AIPackage) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *AIPackage) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *AIPackage) GetDescription() string { + return o.Description +} +func (o *AIPackage) SetDescription(v string) { + o.Description = v +} +func (o *AIPackage) GetExtensions() []IExtension { + return o.Extensions +} +func (o *AIPackage) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *AIPackage) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *AIPackage) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *AIPackage) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *AIPackage) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *AIPackage) GetName() string { + return o.Name +} +func (o *AIPackage) SetName(v string) { + o.Name = v +} +func (o *AIPackage) GetSummary() string { + return o.Summary +} +func (o *AIPackage) SetSummary(v string) { + o.Summary = v +} +func (o *AIPackage) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *AIPackage) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *AIPackage) GetBuiltTime() string { + return o.BuiltTime +} +func (o *AIPackage) SetBuiltTime(v string) { + o.BuiltTime = v +} +func (o *AIPackage) GetOriginatedBy() []IAgent { + return o.OriginatedBy +} +func (o *AIPackage) SetOriginatedBy(v ...IAgent) { + o.OriginatedBy = v +} +func (o *AIPackage) GetReleaseTime() string { + return o.ReleaseTime +} +func (o *AIPackage) SetReleaseTime(v string) { + o.ReleaseTime = v +} +func (o *AIPackage) GetStandardName() []string { + return o.StandardName +} +func (o *AIPackage) SetStandardName(v ...string) { + o.StandardName = v +} +func (o *AIPackage) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *AIPackage) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *AIPackage) GetSupportLevel() []SupportType { + return o.SupportLevel +} +func (o *AIPackage) SetSupportLevel(v ...SupportType) { + o.SupportLevel = v +} +func (o *AIPackage) GetValidUntilTime() string { + return o.ValidUntilTime +} +func (o *AIPackage) SetValidUntilTime(v string) { + o.ValidUntilTime = v +} + +func (o *AIPackage) GetAdditionalPurpose() []SoftwarePurpose { + return o.AdditionalPurpose +} +func (o *AIPackage) SetAdditionalPurpose(v ...SoftwarePurpose) { + o.AdditionalPurpose = v +} +func (o *AIPackage) GetAttributionText() []string { + return o.AttributionText +} +func (o *AIPackage) SetAttributionText(v ...string) { + o.AttributionText = v +} +func (o *AIPackage) GetContentIdentifier() []IContentIdentifier { + return o.ContentIdentifier +} +func (o *AIPackage) SetContentIdentifier(v ...IContentIdentifier) { + o.ContentIdentifier = v +} +func (o *AIPackage) GetCopyrightText() string { + return o.CopyrightText +} +func (o *AIPackage) SetCopyrightText(v string) { + o.CopyrightText = v +} +func (o *AIPackage) GetPrimaryPurpose() SoftwarePurpose { + return o.PrimaryPurpose +} +func (o *AIPackage) SetPrimaryPurpose(v SoftwarePurpose) { + o.PrimaryPurpose = v +} + +func (o *AIPackage) GetDownloadLocation() string { + return o.DownloadLocation +} +func (o *AIPackage) SetDownloadLocation(v string) { + o.DownloadLocation = v +} +func (o *AIPackage) GetHomePage() string { + return o.HomePage +} +func (o *AIPackage) SetHomePage(v string) { + o.HomePage = v +} +func (o *AIPackage) GetPackageUrl() string { + return o.PackageUrl +} +func (o *AIPackage) SetPackageUrl(v string) { + o.PackageUrl = v +} +func (o *AIPackage) GetPackageVersion() string { + return o.PackageVersion +} +func (o *AIPackage) SetPackageVersion(v string) { + o.PackageVersion = v +} +func (o *AIPackage) GetSourceInfo() string { + return o.SourceInfo +} +func (o *AIPackage) SetSourceInfo(v string) { + o.SourceInfo = v +} + +func (o *AIPackage) GetAutonomyType() PresenceType { + return o.AutonomyType +} +func (o *AIPackage) SetAutonomyType(v PresenceType) { + o.AutonomyType = v +} +func (o *AIPackage) GetDomain() []string { + return o.Domain +} +func (o *AIPackage) SetDomain(v ...string) { + o.Domain = v +} +func (o *AIPackage) GetEnergyConsumption() IEnergyConsumption { + return o.EnergyConsumption +} +func (o *AIPackage) SetEnergyConsumption(v IEnergyConsumption) { + o.EnergyConsumption = v +} +func (o *AIPackage) GetHyperparameter() []IDictionaryEntry { + return o.Hyperparameter +} +func (o *AIPackage) SetHyperparameter(v ...IDictionaryEntry) { + o.Hyperparameter = v +} +func (o *AIPackage) GetInformationAboutApplication() string { + return o.InformationAboutApplication +} +func (o *AIPackage) SetInformationAboutApplication(v string) { + o.InformationAboutApplication = v +} +func (o *AIPackage) GetInformationAboutTraining() string { + return o.InformationAboutTraining +} +func (o *AIPackage) SetInformationAboutTraining(v string) { + o.InformationAboutTraining = v +} +func (o *AIPackage) GetLimitation() string { + return o.Limitation +} +func (o *AIPackage) SetLimitation(v string) { + o.Limitation = v +} +func (o *AIPackage) GetMetric() []IDictionaryEntry { + return o.Metric +} +func (o *AIPackage) SetMetric(v ...IDictionaryEntry) { + o.Metric = v +} +func (o *AIPackage) GetMetricDecisionThreshold() []IDictionaryEntry { + return o.MetricDecisionThreshold +} +func (o *AIPackage) SetMetricDecisionThreshold(v ...IDictionaryEntry) { + o.MetricDecisionThreshold = v +} +func (o *AIPackage) GetModelDataPreprocessing() []string { + return o.ModelDataPreprocessing +} +func (o *AIPackage) SetModelDataPreprocessing(v ...string) { + o.ModelDataPreprocessing = v +} +func (o *AIPackage) GetModelExplainability() []string { + return o.ModelExplainability +} +func (o *AIPackage) SetModelExplainability(v ...string) { + o.ModelExplainability = v +} +func (o *AIPackage) GetSafetyRiskAssessment() SafetyRiskAssessmentType { + return o.SafetyRiskAssessment +} +func (o *AIPackage) SetSafetyRiskAssessment(v SafetyRiskAssessmentType) { + o.SafetyRiskAssessment = v +} +func (o *AIPackage) GetStandardCompliance() []string { + return o.StandardCompliance +} +func (o *AIPackage) SetStandardCompliance(v ...string) { + o.StandardCompliance = v +} +func (o *AIPackage) GetTypeOfModel() []string { + return o.TypeOfModel +} +func (o *AIPackage) SetTypeOfModel(v ...string) { + o.TypeOfModel = v +} +func (o *AIPackage) GetUseSensitivePersonalInformation() PresenceType { + return o.UseSensitivePersonalInformation +} +func (o *AIPackage) SetUseSensitivePersonalInformation(v PresenceType) { + o.UseSensitivePersonalInformation = v +} + +type IDatasetPackage interface { + IPackage + + // GetAnonymizationMethodUsed describes the anonymization methods used. + GetAnonymizationMethodUsed() []string + + SetAnonymizationMethodUsed(...string) + + // GetConfidentialityLevel describes the confidentiality level of the data points contained in the dataset. + GetConfidentialityLevel() ConfidentialityLevelType + + SetConfidentialityLevel(ConfidentialityLevelType) + + // GetDataCollectionProcess describes how the dataset was collected. + GetDataCollectionProcess() string + + SetDataCollectionProcess(string) + + // GetDataPreprocessing describes the preprocessing steps that were applied to the raw data to create the given dataset. + GetDataPreprocessing() []string + + SetDataPreprocessing(...string) + + // GetDatasetAvailability the field describes the availability of a dataset. + GetDatasetAvailability() DatasetAvailabilityType + + SetDatasetAvailability(DatasetAvailabilityType) + + // GetDatasetNoise describes potentially noisy elements of the dataset. + GetDatasetNoise() string + + SetDatasetNoise(string) + + // GetDatasetSize captures the size of the dataset. + GetDatasetSize() uint + + SetDatasetSize(uint) + + // GetDatasetType describes the type of the given dataset. + GetDatasetType() []DatasetType + + SetDatasetType(...DatasetType) + + // GetDatasetUpdateMechanism describes a mechanism to update the dataset. + GetDatasetUpdateMechanism() string + + SetDatasetUpdateMechanism(string) + + // GetHasSensitivePersonalInformation describes if any sensitive personal information is present in the dataset. + GetHasSensitivePersonalInformation() PresenceType + + SetHasSensitivePersonalInformation(PresenceType) + + // GetIntendedUse describes what the given dataset should be used for. + GetIntendedUse() string + + SetIntendedUse(string) + + // GetKnownBias records the biases that the dataset is known to encompass. + GetKnownBias() []string + + SetKnownBias(...string) + + // GetSensor describes a sensor used for collecting the data. + GetSensor() []IDictionaryEntry + + SetSensor(...IDictionaryEntry) +} + +type DatasetPackage struct { + _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetPackage" iri-compact:"dataset_DatasetPackage" id-prop:"spdxId"` + + // SpdxId identifier property + SpdxId string `iri:"@id" iri-compact:"spdxId"` + // Comment provide consumers with comments by the creator of the Element about the + // Element. + Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // CreationInfo provides information about the creation of the Element. + CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` + // Description provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` + // Extensions specifies an Extension characterization of some aspect of an Element. + Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` + // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` + // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` + // Name identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` + // Summary a short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` + // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + + // BuiltTime specifies the time an artifact was built. + BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` + // OriginatedBy identifies from where or whom the Element originally came. + OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` + // ReleaseTime specifies the time an artifact was released. + ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` + // StandardName the name of a relevant standard that may apply to an artifact. + StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` + // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` + // SupportLevel specifies the level of support associated with an artifact. + SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` + // ValidUntilTime specifies until when the artifact can be used before its usage needs to be + // reassessed. + ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` + + // AdditionalPurpose provides additional purpose information of the software artifact. + AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` + // AttributionText provides a place for the SPDX data creator to record acknowledgement text for + // a software Package, File or Snippet. + AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` + // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be + // used for verifying its identity and/or integrity. + ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` + // CopyrightText identifies the text of one or more copyright notices for a software Package, + // File or Snippet, if any. + CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` + // PrimaryPurpose provides information about the primary purpose of the software artifact. + PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` + + // DownloadLocation identifies the download Uniform Resource Identifier for the package at the time + // that the document was created. + DownloadLocation string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/downloadLocation" iri-compact:"software_downloadLocation"` + // HomePage a place for the SPDX document creator to record a website that serves as the + // package's home page. + HomePage string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/homePage" iri-compact:"software_homePage"` + // PackageUrl provides a place for the SPDX data creator to record the package URL string + // (in accordance with the + // [package URL spec](https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst)) + // for a software Package. + PackageUrl string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageUrl" iri-compact:"software_packageUrl"` + // PackageVersion identify the version of a package. + PackageVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageVersion" iri-compact:"software_packageVersion"` + // SourceInfo records any relevant background information or additional comments + // about the origin of the package. + SourceInfo string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/sourceInfo" iri-compact:"software_sourceInfo"` + + // AnonymizationMethodUsed describes the anonymization methods used. + AnonymizationMethodUsed []string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/anonymizationMethodUsed" iri-compact:"dataset_anonymizationMethodUsed"` + // ConfidentialityLevel describes the confidentiality level of the data points contained in the dataset. + ConfidentialityLevel ConfidentialityLevelType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/confidentialityLevel" iri-compact:"dataset_confidentialityLevel"` + // DataCollectionProcess describes how the dataset was collected. + DataCollectionProcess string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/dataCollectionProcess" iri-compact:"dataset_dataCollectionProcess"` + // DataPreprocessing describes the preprocessing steps that were applied to the raw data to create the given dataset. + DataPreprocessing []string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/dataPreprocessing" iri-compact:"dataset_dataPreprocessing"` + // DatasetAvailability the field describes the availability of a dataset. + DatasetAvailability DatasetAvailabilityType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/datasetAvailability" iri-compact:"dataset_datasetAvailability"` + // DatasetNoise describes potentially noisy elements of the dataset. + DatasetNoise string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/datasetNoise" iri-compact:"dataset_datasetNoise"` + // DatasetSize captures the size of the dataset. + DatasetSize uint `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/datasetSize" iri-compact:"dataset_datasetSize"` + // DatasetType describes the type of the given dataset. + DatasetType []DatasetType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/datasetType" iri-compact:"dataset_datasetType"` + // DatasetUpdateMechanism describes a mechanism to update the dataset. + DatasetUpdateMechanism string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/datasetUpdateMechanism" iri-compact:"dataset_datasetUpdateMechanism"` + // HasSensitivePersonalInformation describes if any sensitive personal information is present in the dataset. + HasSensitivePersonalInformation PresenceType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/hasSensitivePersonalInformation" iri-compact:"dataset_hasSensitivePersonalInformation"` + // IntendedUse describes what the given dataset should be used for. + IntendedUse string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/intendedUse" iri-compact:"dataset_intendedUse"` + // KnownBias records the biases that the dataset is known to encompass. + KnownBias []string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/knownBias" iri-compact:"dataset_knownBias"` + // Sensor describes a sensor used for collecting the data. + Sensor []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/sensor" iri-compact:"dataset_sensor"` +} + +func NewDatasetPackage() IDatasetPackage { + return &DatasetPackage{} +} + +func (o *DatasetPackage) GetSpdxId() string { + return o.SpdxId +} +func (o *DatasetPackage) SetSpdxId(v string) { + o.SpdxId = v +} +func (o *DatasetPackage) GetComment() string { + return o.Comment +} +func (o *DatasetPackage) SetComment(v string) { + o.Comment = v +} +func (o *DatasetPackage) GetCreationInfo() ICreationInfo { + return o.CreationInfo +} +func (o *DatasetPackage) SetCreationInfo(v ICreationInfo) { + o.CreationInfo = v +} +func (o *DatasetPackage) GetDescription() string { + return o.Description +} +func (o *DatasetPackage) SetDescription(v string) { + o.Description = v +} +func (o *DatasetPackage) GetExtensions() []IExtension { + return o.Extensions +} +func (o *DatasetPackage) SetExtensions(v ...IExtension) { + o.Extensions = v +} +func (o *DatasetPackage) GetExternalIdentifiers() []IExternalIdentifier { + return o.ExternalIdentifiers +} +func (o *DatasetPackage) SetExternalIdentifiers(v ...IExternalIdentifier) { + o.ExternalIdentifiers = v +} +func (o *DatasetPackage) GetExternalRefs() []IExternalRef { + return o.ExternalRefs +} +func (o *DatasetPackage) SetExternalRefs(v ...IExternalRef) { + o.ExternalRefs = v +} +func (o *DatasetPackage) GetName() string { + return o.Name +} +func (o *DatasetPackage) SetName(v string) { + o.Name = v +} +func (o *DatasetPackage) GetSummary() string { + return o.Summary +} +func (o *DatasetPackage) SetSummary(v string) { + o.Summary = v +} +func (o *DatasetPackage) GetVerifiedUsing() []IIntegrityMethod { + return o.VerifiedUsing +} +func (o *DatasetPackage) SetVerifiedUsing(v ...IIntegrityMethod) { + o.VerifiedUsing = v +} + +func (o *DatasetPackage) GetBuiltTime() string { + return o.BuiltTime +} +func (o *DatasetPackage) SetBuiltTime(v string) { + o.BuiltTime = v +} +func (o *DatasetPackage) GetOriginatedBy() []IAgent { + return o.OriginatedBy +} +func (o *DatasetPackage) SetOriginatedBy(v ...IAgent) { + o.OriginatedBy = v +} +func (o *DatasetPackage) GetReleaseTime() string { + return o.ReleaseTime +} +func (o *DatasetPackage) SetReleaseTime(v string) { + o.ReleaseTime = v +} +func (o *DatasetPackage) GetStandardName() []string { + return o.StandardName +} +func (o *DatasetPackage) SetStandardName(v ...string) { + o.StandardName = v +} +func (o *DatasetPackage) GetSuppliedBy() IAgent { + return o.SuppliedBy +} +func (o *DatasetPackage) SetSuppliedBy(v IAgent) { + o.SuppliedBy = v +} +func (o *DatasetPackage) GetSupportLevel() []SupportType { + return o.SupportLevel +} +func (o *DatasetPackage) SetSupportLevel(v ...SupportType) { + o.SupportLevel = v +} +func (o *DatasetPackage) GetValidUntilTime() string { + return o.ValidUntilTime +} +func (o *DatasetPackage) SetValidUntilTime(v string) { + o.ValidUntilTime = v +} + +func (o *DatasetPackage) GetAdditionalPurpose() []SoftwarePurpose { + return o.AdditionalPurpose +} +func (o *DatasetPackage) SetAdditionalPurpose(v ...SoftwarePurpose) { + o.AdditionalPurpose = v +} +func (o *DatasetPackage) GetAttributionText() []string { + return o.AttributionText +} +func (o *DatasetPackage) SetAttributionText(v ...string) { + o.AttributionText = v +} +func (o *DatasetPackage) GetContentIdentifier() []IContentIdentifier { + return o.ContentIdentifier +} +func (o *DatasetPackage) SetContentIdentifier(v ...IContentIdentifier) { + o.ContentIdentifier = v +} +func (o *DatasetPackage) GetCopyrightText() string { + return o.CopyrightText +} +func (o *DatasetPackage) SetCopyrightText(v string) { + o.CopyrightText = v +} +func (o *DatasetPackage) GetPrimaryPurpose() SoftwarePurpose { + return o.PrimaryPurpose +} +func (o *DatasetPackage) SetPrimaryPurpose(v SoftwarePurpose) { + o.PrimaryPurpose = v +} + +func (o *DatasetPackage) GetDownloadLocation() string { + return o.DownloadLocation +} +func (o *DatasetPackage) SetDownloadLocation(v string) { + o.DownloadLocation = v +} +func (o *DatasetPackage) GetHomePage() string { + return o.HomePage +} +func (o *DatasetPackage) SetHomePage(v string) { + o.HomePage = v +} +func (o *DatasetPackage) GetPackageUrl() string { + return o.PackageUrl +} +func (o *DatasetPackage) SetPackageUrl(v string) { + o.PackageUrl = v +} +func (o *DatasetPackage) GetPackageVersion() string { + return o.PackageVersion +} +func (o *DatasetPackage) SetPackageVersion(v string) { + o.PackageVersion = v +} +func (o *DatasetPackage) GetSourceInfo() string { + return o.SourceInfo +} +func (o *DatasetPackage) SetSourceInfo(v string) { + o.SourceInfo = v +} + +func (o *DatasetPackage) GetAnonymizationMethodUsed() []string { + return o.AnonymizationMethodUsed +} +func (o *DatasetPackage) SetAnonymizationMethodUsed(v ...string) { + o.AnonymizationMethodUsed = v +} +func (o *DatasetPackage) GetConfidentialityLevel() ConfidentialityLevelType { + return o.ConfidentialityLevel +} +func (o *DatasetPackage) SetConfidentialityLevel(v ConfidentialityLevelType) { + o.ConfidentialityLevel = v +} +func (o *DatasetPackage) GetDataCollectionProcess() string { + return o.DataCollectionProcess +} +func (o *DatasetPackage) SetDataCollectionProcess(v string) { + o.DataCollectionProcess = v +} +func (o *DatasetPackage) GetDataPreprocessing() []string { + return o.DataPreprocessing +} +func (o *DatasetPackage) SetDataPreprocessing(v ...string) { + o.DataPreprocessing = v +} +func (o *DatasetPackage) GetDatasetAvailability() DatasetAvailabilityType { + return o.DatasetAvailability +} +func (o *DatasetPackage) SetDatasetAvailability(v DatasetAvailabilityType) { + o.DatasetAvailability = v +} +func (o *DatasetPackage) GetDatasetNoise() string { + return o.DatasetNoise +} +func (o *DatasetPackage) SetDatasetNoise(v string) { + o.DatasetNoise = v +} +func (o *DatasetPackage) GetDatasetSize() uint { + return o.DatasetSize +} +func (o *DatasetPackage) SetDatasetSize(v uint) { + o.DatasetSize = v +} +func (o *DatasetPackage) GetDatasetType() []DatasetType { + return o.DatasetType +} +func (o *DatasetPackage) SetDatasetType(v ...DatasetType) { + o.DatasetType = v +} +func (o *DatasetPackage) GetDatasetUpdateMechanism() string { + return o.DatasetUpdateMechanism +} +func (o *DatasetPackage) SetDatasetUpdateMechanism(v string) { + o.DatasetUpdateMechanism = v +} +func (o *DatasetPackage) GetHasSensitivePersonalInformation() PresenceType { + return o.HasSensitivePersonalInformation +} +func (o *DatasetPackage) SetHasSensitivePersonalInformation(v PresenceType) { + o.HasSensitivePersonalInformation = v +} +func (o *DatasetPackage) GetIntendedUse() string { + return o.IntendedUse +} +func (o *DatasetPackage) SetIntendedUse(v string) { + o.IntendedUse = v +} +func (o *DatasetPackage) GetKnownBias() []string { + return o.KnownBias +} +func (o *DatasetPackage) SetKnownBias(v ...string) { + o.KnownBias = v +} +func (o *DatasetPackage) GetSensor() []IDictionaryEntry { + return o.Sensor +} +func (o *DatasetPackage) SetSensor(v ...IDictionaryEntry) { + o.Sensor = v +} + +var ldGlobal = ldContext{}. + RegisterTypes("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", + &EnergyConsumption{}, + &EnergyConsumptionDescription{}, + &EnergyUnitType{}, + &SafetyRiskAssessmentType{}, + &AnnotationType{}, + &CreationInfo{}, + &DictionaryEntry{}, + &Element{}, + &ElementCollection{}, + &ExternalIdentifier{}, + &ExternalIdentifierType{}, + &ExternalMap{}, + &ExternalRef{}, + &ExternalRefType{}, + &HashAlgorithm{}, + &IntegrityMethod{}, + &LifecycleScopeType{}, + &NamespaceMap{}, + &PackageVerificationCode{}, + &PositiveIntegerRange{}, + &PresenceType{}, + &ProfileIdentifierType{}, + &Relationship{}, + &RelationshipCompleteness{}, + &RelationshipType{}, + &SpdxDocument{}, + &SupportType{}, + &Tool{}, + &ConfidentialityLevelType{}, + &DatasetAvailabilityType{}, + &DatasetType{}, + &LicenseAddition{}, + &ListedLicenseException{}, + &CdxPropertyEntry{}, + &Extension{}, + &CvssSeverityType{}, + &ExploitCatalogType{}, + &SsvcDecisionType{}, + &VexJustificationType{}, + &VulnAssessmentRelationship{}, + &AnyLicenseInfo{}, + &LicenseExpression{}, + &SimpleLicensingText{}, + &ContentIdentifier{}, + &ContentIdentifierType{}, + &FileKindType{}, + &SbomType{}, + &SoftwarePurpose{}, + &Build{}, + &Agent{}, + &Annotation{}, + &Artifact{}, + &Bundle{}, + &Hash{}, + &LifecycleScopedRelationship{}, + &Organization{}, + &Person{}, + &SoftwareAgent{}, + &ConjunctiveLicenseSet{}, + &CustomLicenseAddition{}, + &DisjunctiveLicenseSet{}, + &ExtendableLicense{}, + &IndividualLicensingInfo{}, + &License{}, + &ListedLicense{}, + &OrLaterOperator{}, + &WithAdditionOperator{}, + &CdxPropertiesExtension{}, + &CvssV2VulnAssessmentRelationship{}, + &CvssV3VulnAssessmentRelationship{}, + &CvssV4VulnAssessmentRelationship{}, + &EpssVulnAssessmentRelationship{}, + &ExploitCatalogVulnAssessmentRelationship{}, + &SsvcVulnAssessmentRelationship{}, + &VexVulnAssessmentRelationship{}, + &Vulnerability{}, + &SoftwareArtifact{}, + &Bom{}, + &CustomLicense{}, + &VexAffectedVulnAssessmentRelationship{}, + &VexFixedVulnAssessmentRelationship{}, + &VexNotAffectedVulnAssessmentRelationship{}, + &VexUnderInvestigationVulnAssessmentRelationship{}, + &File{}, + &Package{}, + &Sbom{}, + &Snippet{}, + &AIPackage{}, + &DatasetPackage{}, + ). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &EnergyUnitType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/kilowattHour": "kilowattHour", + "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/megajoule": "megajoule", + "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/other": "other", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ProfileIdentifierType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/ai": "ai", + "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/build": "build", + "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/core": "core", + "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/dataset": "dataset", + "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/expandedLicensing": "expandedLicensing", + "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/extension": "extension", + "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/lite": "lite", + "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/security": "security", + "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/simpleLicensing": "simpleLicensing", + "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/software": "software", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ExternalIdentifierType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cpe22": "cpe22", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cpe23": "cpe23", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cve": "cve", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/email": "email", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/gitoid": "gitoid", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/other": "other", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/packageUrl": "packageUrl", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/securityOther": "securityOther", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/swhid": "swhid", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/swid": "swid", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/urlScheme": "urlScheme", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ExternalRefType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/altDownloadLocation": "altDownloadLocation", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/altWebPage": "altWebPage", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/binaryArtifact": "binaryArtifact", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/bower": "bower", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/buildMeta": "buildMeta", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/buildSystem": "buildSystem", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/certificationReport": "certificationReport", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/chat": "chat", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/componentAnalysisReport": "componentAnalysisReport", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/cwe": "cwe", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/documentation": "documentation", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/dynamicAnalysisReport": "dynamicAnalysisReport", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/eolNotice": "eolNotice", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/exportControlAssessment": "exportControlAssessment", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/funding": "funding", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/issueTracker": "issueTracker", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/license": "license", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/mailingList": "mailingList", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/mavenCentral": "mavenCentral", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/metrics": "metrics", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/npm": "npm", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/nuget": "nuget", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/other": "other", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/privacyAssessment": "privacyAssessment", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/productMetadata": "productMetadata", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/purchaseOrder": "purchaseOrder", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/qualityAssessmentReport": "qualityAssessmentReport", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/releaseHistory": "releaseHistory", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/releaseNotes": "releaseNotes", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/riskAssessment": "riskAssessment", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/runtimeAnalysisReport": "runtimeAnalysisReport", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/secureSoftwareAttestation": "secureSoftwareAttestation", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityAdversaryModel": "securityAdversaryModel", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityAdvisory": "securityAdvisory", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityFix": "securityFix", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityOther": "securityOther", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityPenTestReport": "securityPenTestReport", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityPolicy": "securityPolicy", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityThreatModel": "securityThreatModel", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/socialMedia": "socialMedia", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/sourceArtifact": "sourceArtifact", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/staticAnalysisReport": "staticAnalysisReport", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/support": "support", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vcs": "vcs", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vulnerabilityDisclosureReport": "vulnerabilityDisclosureReport", + "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vulnerabilityExploitabilityAssessment": "vulnerabilityExploitabilityAssessment", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &HashAlgorithm{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b256": "blake2b256", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b384": "blake2b384", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b512": "blake2b512", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake3": "blake3", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsDilithium": "crystalsDilithium", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsKyber": "crystalsKyber", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/falcon": "falcon", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md2": "md2", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md4": "md4", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md5": "md5", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md6": "md6", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/other": "other", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha1": "sha1", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha224": "sha224", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha256": "sha256", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha384": "sha384", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_224": "sha3_224", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_256": "sha3_256", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_384": "sha3_384", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_512": "sha3_512", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha512": "sha512", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &RelationshipCompleteness{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/complete": "complete", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/incomplete": "incomplete", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/noAssertion": "noAssertion", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &RelationshipType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/affects": "affects", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/amendedBy": "amendedBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/ancestorOf": "ancestorOf", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/availableFrom": "availableFrom", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/configures": "configures", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/contains": "contains", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/coordinatedBy": "coordinatedBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/copiedTo": "copiedTo", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/delegatedTo": "delegatedTo", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/dependsOn": "dependsOn", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/descendantOf": "descendantOf", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/describes": "describes", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/doesNotAffect": "doesNotAffect", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/expandsTo": "expandsTo", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/exploitCreatedBy": "exploitCreatedBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/fixedBy": "fixedBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/fixedIn": "fixedIn", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/foundBy": "foundBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/generates": "generates", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAddedFile": "hasAddedFile", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAssessmentFor": "hasAssessmentFor", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAssociatedVulnerability": "hasAssociatedVulnerability", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasConcludedLicense": "hasConcludedLicense", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDataFile": "hasDataFile", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDeclaredLicense": "hasDeclaredLicense", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDeletedFile": "hasDeletedFile", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDependencyManifest": "hasDependencyManifest", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDistributionArtifact": "hasDistributionArtifact", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDocumentation": "hasDocumentation", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDynamicLink": "hasDynamicLink", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasEvidence": "hasEvidence", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasExample": "hasExample", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasHost": "hasHost", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasInputs": "hasInputs", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasMetadata": "hasMetadata", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOptionalComponent": "hasOptionalComponent", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOptionalDependency": "hasOptionalDependency", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOutputs": "hasOutputs", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasPrerequsite": "hasPrerequsite", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasProvidedDependency": "hasProvidedDependency", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasRequirement": "hasRequirement", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasSpecification": "hasSpecification", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasStaticLink": "hasStaticLink", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasTest": "hasTest", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasTestCase": "hasTestCase", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasVariant": "hasVariant", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/invokedBy": "invokedBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/modifiedBy": "modifiedBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/other": "other", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/packagedBy": "packagedBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/patchedBy": "patchedBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/publishedBy": "publishedBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/reportedBy": "reportedBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/republishedBy": "republishedBy", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/serializedInArtifact": "serializedInArtifact", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/testedOn": "testedOn", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/trainedOn": "trainedOn", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/underInvestigationFor": "underInvestigationFor", + "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/usesTool": "usesTool", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ContentIdentifierType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifierType/gitoid": "gitoid", + "https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifierType/swhid": "swhid", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &AnnotationType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/AnnotationType/other": "other", + "https://spdx.org/rdf/3.0.0/terms/Core/AnnotationType/review": "review", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SupportType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/deployed": "deployed", + "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/development": "development", + "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/endOfSupport": "endOfSupport", + "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/limitedSupport": "limitedSupport", + "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/noAssertion": "noAssertion", + "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/noSupport": "noSupport", + "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/support": "support", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &HashAlgorithm{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b256": "blake2b256", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b384": "blake2b384", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b512": "blake2b512", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake3": "blake3", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsDilithium": "crystalsDilithium", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsKyber": "crystalsKyber", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/falcon": "falcon", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md2": "md2", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md4": "md4", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md5": "md5", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md6": "md6", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/other": "other", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha1": "sha1", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha224": "sha224", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha256": "sha256", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha384": "sha384", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_224": "sha3_224", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_256": "sha3_256", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_384": "sha3_384", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_512": "sha3_512", + "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha512": "sha512", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &LifecycleScopeType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/build": "build", + "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/design": "design", + "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/development": "development", + "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/other": "other", + "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/runtime": "runtime", + "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/test": "test", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &CvssSeverityType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/critical": "critical", + "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/high": "high", + "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/low": "low", + "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/medium": "medium", + "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/none": "none", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &CvssSeverityType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/critical": "critical", + "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/high": "high", + "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/low": "low", + "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/medium": "medium", + "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/none": "none", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ExploitCatalogType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogType/kev": "kev", + "https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogType/other": "other", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SsvcDecisionType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/act": "act", + "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/attend": "attend", + "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/track": "track", + "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/trackStar": "trackStar", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SoftwarePurpose{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/application": "application", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/archive": "archive", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/bom": "bom", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/configuration": "configuration", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/container": "container", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/data": "data", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/device": "device", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/deviceDriver": "deviceDriver", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/diskImage": "diskImage", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/documentation": "documentation", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/evidence": "evidence", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/executable": "executable", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/file": "file", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/filesystemImage": "filesystemImage", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/firmware": "firmware", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/framework": "framework", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/install": "install", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/library": "library", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/manifest": "manifest", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/model": "model", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/module": "module", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/operatingSystem": "operatingSystem", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/other": "other", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/patch": "patch", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/platform": "platform", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/requirement": "requirement", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/source": "source", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/specification": "specification", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/test": "test", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SoftwarePurpose{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/application": "application", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/archive": "archive", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/bom": "bom", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/configuration": "configuration", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/container": "container", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/data": "data", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/device": "device", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/deviceDriver": "deviceDriver", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/diskImage": "diskImage", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/documentation": "documentation", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/evidence": "evidence", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/executable": "executable", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/file": "file", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/filesystemImage": "filesystemImage", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/firmware": "firmware", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/framework": "framework", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/install": "install", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/library": "library", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/manifest": "manifest", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/model": "model", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/module": "module", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/operatingSystem": "operatingSystem", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/other": "other", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/patch": "patch", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/platform": "platform", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/requirement": "requirement", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/source": "source", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/specification": "specification", + "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/test": "test", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &VexJustificationType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/componentNotPresent": "componentNotPresent", + "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/inlineMitigationsAlreadyExist": "inlineMitigationsAlreadyExist", + "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeCannotBeControlledByAdversary": "vulnerableCodeCannotBeControlledByAdversary", + "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeNotInExecutePath": "vulnerableCodeNotInExecutePath", + "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeNotPresent": "vulnerableCodeNotPresent", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &FileKindType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Software/FileKindType/directory": "directory", + "https://spdx.org/rdf/3.0.0/terms/Software/FileKindType/file": "file", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SbomType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/analyzed": "analyzed", + "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/build": "build", + "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/deployed": "deployed", + "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/design": "design", + "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/runtime": "runtime", + "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/source": "source", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &PresenceType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/no": "no", + "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/noAssertion": "noAssertion", + "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/yes": "yes", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SafetyRiskAssessmentType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/high": "high", + "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/low": "low", + "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/medium": "medium", + "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/serious": "serious", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &PresenceType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/no": "no", + "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/noAssertion": "noAssertion", + "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/yes": "yes", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ConfidentialityLevelType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/amber": "amber", + "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/clear": "clear", + "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/green": "green", + "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/red": "red", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &DatasetAvailabilityType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/clickthrough": "clickthrough", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/directDownload": "directDownload", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/query": "query", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/registration": "registration", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/scrapingScript": "scrapingScript", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &DatasetType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/audio": "audio", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/categorical": "categorical", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/graph": "graph", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/image": "image", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/noAssertion": "noAssertion", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/numeric": "numeric", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/other": "other", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/sensor": "sensor", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/structured": "structured", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/syntactic": "syntactic", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/text": "text", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/timeseries": "timeseries", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/timestamp": "timestamp", + "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/video": "video", + }). + IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &PresenceType{}, map[string]string{ + "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/no": "no", + "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/noAssertion": "noAssertion", + "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/yes": "yes", + }) diff --git a/spdx/v3/v3_0/relationships.go b/spdx/v3/v3_0/relationships.go new file mode 100644 index 00000000..e19fa221 --- /dev/null +++ b/spdx/v3/v3_0/relationships.go @@ -0,0 +1,15 @@ +package v3_0 + +type Relationships struct { + relationships []IRelationship +} + +func (r Relationships) From(element IElement) Relationships { + var out []IRelationship + for _, r := range r.relationships { + if r.GetFrom() == element { + out = append(out, r) + } + } + return Relationships{out} +} diff --git a/spdx/v3/v3_0/spdx.go b/spdx/v3/v3_0/spdx.go new file mode 100644 index 00000000..6744952e --- /dev/null +++ b/spdx/v3/v3_0/spdx.go @@ -0,0 +1,206 @@ +package v3_0 + +import ( + "encoding/json" + "fmt" + "io" + "math/rand" + "reflect" + "time" +) + +/* +SPDX 3 models and serialization code is generated from prototype golang support for shacl2code, +https://github.com/kzantow-anchore/shacl2code/tree/golang-bindings (with contributions from Nisha and Keith) + +To regenerate, use something like this command: +.venv/bin/python -m shacl2code generate -i https://spdx.org/rdf/3.0.0/spdx-model.ttl -i https://spdx.org/rdf/3.0.0/spdx-json-serialize-annotations.ttl -x https://spdx.org/rdf/3.0.0/spdx-context.jsonld golang --package v3_0 --license MIT --output $HOME/projects/tools-golang/spdx/v3/v3_0/model.go --remap-props element=elements,extension=extensions,externalIdentifier=externalIdentifiers,externalRef=externalRefs,rootElement=rootElements +*/ + +type Document struct { + creationInfo *CreationInfo + document *SpdxDocument + graph []any + ldc ldContext +} + +func NewDocument(creator IAgent) *Document { + ci := &CreationInfo{ + Created: time.Now().Format(time.RFC3339), + CreatedBy: []IAgent{ + creator, + }, + } + creator.SetCreationInfo(ci) + return &Document{ + creationInfo: ci, + document: &SpdxDocument{ + CreationInfo: ci, + }, + graph: []any{ci, creator}, + ldc: ldGlobal, + } +} + +func (d *Document) CreationInfo() ICreationInfo { + return d.creationInfo +} + +func (d *Document) AddElement(e ...IElement) { + d.document.RootElements = append(d.document.RootElements, e...) + d.document.Elements = append(d.document.Elements, e...) +} + +func (d *Document) GetElements() []IElement { + return d.document.RootElements +} + +func (d *Document) Document() *SpdxDocument { + return d.document +} + +func (d *Document) Packages() []IPackage { + return get[IPackage](d) +} + +func (d *Document) Relationships() Relationships { + return Relationships{get[IRelationship](d)} +} + +func (d *Document) Files() []IFile { + return get[IFile](d) +} + +func (d *Document) ToJSON(writer io.Writer) error { + if d.document == nil { + return fmt.Errorf("no document object created") + } + // all IElement need to have creationInfo set... + if d.creationInfo != nil { + d.setCreationInfo(d.creationInfo, d.document) + } + // all IElement need to have spdxID... + if makeIdGenerator != nil { + idGen := makeIdGenerator(d.document) + if d.document.GetSpdxId() == "" { + d.document.SetSpdxId(idGen(d.document)) + } + d.ensureSpdxIDs(d.document, idGen) + } + + maps, err := d.ldc.toMaps(d.document) + if err != nil { + return err + } + enc := json.NewEncoder(writer) + enc.SetEscapeHTML(false) + enc.SetIndent("", " ") + return enc.Encode(maps) +} + +func (d *Document) setCreationInfo(creationInfo ICreationInfo, doc ISpdxDocument) { + iCreationInfoType := reflect.TypeOf((*ICreationInfo)(nil)).Elem() + ci := reflect.ValueOf(creationInfo) + _ = visitObjectGraph(map[reflect.Value]struct{}{}, reflect.ValueOf(doc), func(v reflect.Value) error { + t := v.Type() + if t.Kind() == reflect.Interface && v.IsNil() && t.Implements(iCreationInfoType) { + v.Set(ci) + } + return nil + }) +} + +func (d *Document) ensureSpdxIDs(doc ISpdxDocument, idGen idGenerator) { + iElementType := reflect.TypeOf((*IElement)(nil)).Elem() + _ = visitObjectGraph(map[reflect.Value]struct{}{}, reflect.ValueOf(doc), func(v reflect.Value) error { + if v.Type().Implements(iElementType) { + el, ok := v.Interface().(IElement) + if ok && el.GetSpdxId() == "" { + el.SetSpdxId(idGen(el)) + } + } + return nil + }) +} + +type idGenerator func(e IElement) string + +var makeIdGenerator = func(doc ISpdxDocument) idGenerator { + nextID := map[reflect.Type]uint{} + return func(e IElement) string { + if _, ok := e.(ISpdxDocument); ok { + return fmt.Sprintf("%v", rand.Uint64()) + } + t := baseType(reflect.TypeOf(e)) + // should these be blank nodes? + id := nextID[t] + 1 + nextID[t] = id + return fmt.Sprintf("_:%v-%v-%v", doc.GetSpdxId(), t.Name(), id) + } +} + +func visitObjectGraph(visited map[reflect.Value]struct{}, v reflect.Value, visitor func(reflect.Value) error) error { + if _, ok := visited[v]; ok { + return nil + } + visited[v] = struct{}{} + if !v.IsValid() { + return nil + } + err := visitor(v) + if err != nil { + return err + } + switch v.Kind() { + case reflect.Interface: + if !v.IsNil() { + return visitObjectGraph(visited, v.Elem(), visitor) + } + case reflect.Pointer: + if v.IsNil() { + return nil + } + return visitObjectGraph(visited, v.Elem(), visitor) + case reflect.Struct: + for i := 0; i < v.NumField(); i++ { + err = visitObjectGraph(visited, v.Field(i), visitor) + if err != nil { + return err + } + } + case reflect.Slice: + for i := 0; i < v.Len(); i++ { + err = visitObjectGraph(visited, v.Index(i), visitor) + if err != nil { + return err + } + } + default: + } + return nil +} + +func (d *Document) FromJSON(reader io.Reader) error { + graph, err := d.ldc.FromJSON(reader) + if err != nil { + return err + } + d.graph = append(d.graph, graph) + for _, e := range graph { + if doc, ok := e.(*SpdxDocument); ok { + d.document = doc + return nil + } + } + return fmt.Errorf("no document found") +} + +func get[T any](ctx *Document) []T { + var out []T + for _, i := range ctx.graph { + if i, ok := i.(T); ok { + out = append(out, i) + } + } + return out +} diff --git a/spdx/v3/v3_0/spdx_test.go b/spdx/v3/v3_0/spdx_test.go new file mode 100644 index 00000000..4ae28bd4 --- /dev/null +++ b/spdx/v3/v3_0/spdx_test.go @@ -0,0 +1,211 @@ +package v3_0_test + +import ( + "bytes" + "fmt" + "strings" + "testing" + + "github.com/pmezard/go-difflib/difflib" + + spdx "github.com/spdx/tools-golang/spdx/v3/v3_0" +) + +func Test_exportImportExport(t *testing.T) { + doc := spdx.NewDocument(&spdx.SoftwareAgent{ + Name: "tools-golang", + Summary: "a summary", + }) + doc.Document().SetProfileConformance(spdx.ProfileIdentifierType_Software) + + doc.CreationInfo().SetCreatedUsing( + &spdx.Tool{ + ExternalIdentifiers: []spdx.IExternalIdentifier{ + &spdx.ExternalIdentifier{ + ExternalIdentifierType: spdx.ExternalIdentifierType_Cpe23, + Identifier: "cpe23:a:myvendor:my-product:*:*:*:*:*:*:*", + }, + }, + ExternalRefs: nil, + Name: "not-tools-golang", + }, + ) + + doc.Document().SetName("My Document") + + // add a package + + pkg1 := &spdx.Package{ + Name: "some-package-1", + PackageVersion: "1.2.3", + } + pkg2 := &spdx.Package{ + Name: "some-package-2", + PackageVersion: "2.4.5", + } + doc.AddElement(pkg1, pkg2) + + file1 := &spdx.File{ + Name: "/bin/bash", + } + doc.AddElement(file1) + + // add relationships + + doc.AddElement( + &spdx.Relationship{ + From: file1, + RelationshipType: spdx.RelationshipType_Contains, + To: []spdx.IElement{ + pkg1, + pkg2, + }, + }, + ) + + doc.AddElement( + &spdx.Relationship{ + From: pkg1, + RelationshipType: spdx.RelationshipType_DependsOn, + To: []spdx.IElement{ + pkg2, + }, + }, + ) + + // serialize + + buf := bytes.Buffer{} + err := doc.ToJSON(&buf) + if err != nil { + t.Error(err) + } + + json1 := buf.String() + fmt.Printf("--------- initial JSON: ----------\n%s\n\n", json1) + + // deserialize to a new document + + doc = spdx.NewDocument(&spdx.SoftwareAgent{}) + err = doc.FromJSON(strings.NewReader(json1)) + if err != nil { + t.Error(err) + } + + // re-serialize + + buf.Reset() + err = doc.ToJSON(&buf) + if err != nil { + t.Error(err) + } + json2 := buf.String() + fmt.Printf("--------- reserialized JSON: ----------\n%s\n", json2) + + // compare original to parsed and re-encoded + + diff := difflib.UnifiedDiff{ + A: difflib.SplitLines(json1), + B: difflib.SplitLines(json2), + FromFile: "Original", + ToFile: "Current", + Context: 3, + } + text, _ := difflib.GetUnifiedDiffString(diff) + if text != "" { + t.Errorf(text) + } + + // some basic verification: + + var pkgs []spdx.IPackage + for _, e := range doc.GetElements() { + if rel, ok := e.(spdx.IRelationship); ok && rel.GetRelationshipType() == spdx.RelationshipType_Contains { + if from, ok := rel.GetFrom().(spdx.IFile); ok && from.GetName() == "/bin/bash" { + for _, el := range rel.GetTo() { + if pkg, ok := el.(spdx.IPackage); ok { + pkgs = append(pkgs, pkg) + } + } + + } + } + } + if len(pkgs) != 2 { + t.Error("wrong packages returned") + } +} + +func Test_aiProfile(t *testing.T) { + doc := spdx.NewDocument(&spdx.SoftwareAgent{ + Name: "tools-golang", + Summary: "a summary", + }) + doc.Document().SetProfileConformance(spdx.ProfileIdentifierType_Ai) + + aiPkg := &spdx.AIPackage{ + Name: "some ai package", + EnergyConsumption: &spdx.EnergyConsumption{ + FinetuningEnergyConsumption: []spdx.IEnergyConsumptionDescription{ + &spdx.EnergyConsumptionDescription{ + EnergyQuantity: 1.2, + EnergyUnit: spdx.EnergyUnitType_KilowattHour, + }, + }, + TrainingEnergyConsumption: []spdx.IEnergyConsumptionDescription{ + &spdx.EnergyConsumptionDescription{ + EnergyQuantity: 5032402, + EnergyUnit: spdx.EnergyUnitType_KilowattHour, + }, + }, + }, + TypeOfModel: []string{ + "Llama 3 8B", + }, + } + + doc.AddElement(aiPkg) + + // serialize + + buf := bytes.Buffer{} + err := doc.ToJSON(&buf) + if err != nil { + t.Error(err) + } + + json1 := buf.String() + fmt.Printf("--------- initial JSON: ----------\n%s\n\n", json1) + + // deserialize to a new document + + doc = spdx.NewDocument(&spdx.SoftwareAgent{}) + err = doc.FromJSON(strings.NewReader(json1)) + if err != nil { + t.Error(err) + } + + // re-serialize + + buf.Reset() + err = doc.ToJSON(&buf) + if err != nil { + t.Error(err) + } + json2 := buf.String() + fmt.Printf("--------- reserialized JSON: ----------\n%s\n", json2) + + // compare original to parsed and re-encoded + + diff := difflib.UnifiedDiff{ + A: difflib.SplitLines(json1), + B: difflib.SplitLines(json2), + FromFile: "Original", + ToFile: "Current", + Context: 3, + } + text, _ := difflib.GetUnifiedDiffString(diff) + if text != "" { + t.Errorf(text) + } +} From b92b27a9ee78c8f64b9c9dd90f1df3cefa8fc580 Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Sat, 3 Aug 2024 21:35:50 -0400 Subject: [PATCH 2/8] chore: support external references Signed-off-by: Keith Zantow --- spdx/v3/v3_0/model.go | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/spdx/v3/v3_0/model.go b/spdx/v3/v3_0/model.go index 0559cd78..e1ca5e99 100644 --- a/spdx/v3/v3_0/model.go +++ b/spdx/v3/v3_0/model.go @@ -174,7 +174,20 @@ func (c ldContext) getOrCreateInstance(currentContext *serializationContext, ins }) return instance, err case reflect.Interface: - return emptyValue, fmt.Errorf("unable to determine appropriate type for external IRI reference: %v", incoming) + // an IRI with an interface is a reference to an unknown type, so use the closest type + newType, found := c.findExternalReferenceType(currentContext, expectedType) + if found { + instance = reflect.New(newType) + // try to return the appropriately assignable instance + if !instance.Type().AssignableTo(expectedType) { + instance = instance.Elem() + } + err := c.setStructProps(currentContext, instances, instance, map[string]any{ + ldIDProp: incoming, + }) + return instance, err + } + return emptyValue, fmt.Errorf("unable to determine external reference type while populating %v for IRI reference: %v", typeName(expectedType), incoming) default: } case map[string]any: @@ -367,6 +380,30 @@ func (c ldContext) setSliceValue(currentContext *serializationContext, instances return errs } +func (c ldContext) findExternalReferenceType(currentContext *serializationContext, expectedType reflect.Type) (reflect.Type, bool) { + tc := currentContext.typeToContext[expectedType] + if tc != nil { + return tc.typ, true + } + bestMatch := anyType + for t := range currentContext.typeToContext { + if t.Kind() != reflect.Struct { + continue + } + // the type with the fewest fields assignable to the target is a good candidate to be an abstract type + if reflect.PointerTo(t).AssignableTo(expectedType) && (bestMatch == anyType || bestMatch.NumField() > t.NumField()) { + bestMatch = t + } + } + if bestMatch != anyType { + currentContext.typeToContext[expectedType] = &typeContext{ + typ: bestMatch, + } + return bestMatch, true + } + return anyType, false +} + func skipField(field reflect.StructField) bool { return field.Type.Size() == 0 } From 08c976dcc9b61344d8e4793e3f3ab46d584d7d9c Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Mon, 5 Aug 2024 21:06:35 -0400 Subject: [PATCH 3/8] chore: bad CPE example Signed-off-by: Keith Zantow --- spdx/v3/v3_0/spdx_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spdx/v3/v3_0/spdx_test.go b/spdx/v3/v3_0/spdx_test.go index 4ae28bd4..04db91d5 100644 --- a/spdx/v3/v3_0/spdx_test.go +++ b/spdx/v3/v3_0/spdx_test.go @@ -23,7 +23,7 @@ func Test_exportImportExport(t *testing.T) { ExternalIdentifiers: []spdx.IExternalIdentifier{ &spdx.ExternalIdentifier{ ExternalIdentifierType: spdx.ExternalIdentifierType_Cpe23, - Identifier: "cpe23:a:myvendor:my-product:*:*:*:*:*:*:*", + Identifier: "cpe:2.3:a:myvendor:my-product:*:*:*:*:*:*:*:*", }, }, ExternalRefs: nil, From 49d029d26c5f4dbacf50e8a20392f5f25a42feae Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Tue, 28 Jan 2025 18:05:09 -0500 Subject: [PATCH 4/8] chore: update to new prototype model Signed-off-by: Keith Zantow --- go.mod | 10 +- go.sum | 12 +- spdx/v3/v3_0/model.go | 14259 ++++++++------------------------ spdx/v3/v3_0/relationships.go | 15 - spdx/v3/v3_0/spdx.go | 201 +- spdx/v3/v3_0/spdx_test.go | 313 +- spdx/v3/v3_0/util.go | 38 + spdx/v3/v3_0/validator.go | 1846 +++++ 8 files changed, 5540 insertions(+), 11154 deletions(-) delete mode 100644 spdx/v3/v3_0/relationships.go create mode 100644 spdx/v3/v3_0/util.go create mode 100644 spdx/v3/v3_0/validator.go diff --git a/go.mod b/go.mod index c2a28dab..117238d7 100644 --- a/go.mod +++ b/go.mod @@ -1,17 +1,17 @@ module github.com/spdx/tools-golang -go 1.20 +go 1.23.0 require ( - github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 + github.com/anchore/go-struct-converter v0.0.0-20240925125616-a0883641c664 github.com/google/go-cmp v0.6.0 - github.com/pmezard/go-difflib v1.0.0 - github.com/spdx/gordf v0.0.0-20201111095634-7098f93598fb - github.com/stretchr/testify v1.9.0 + github.com/spdx/gordf v0.0.0-20250128162952-000978ccd6fb + github.com/stretchr/testify v1.10.0 sigs.k8s.io/yaml v1.4.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 670b837c..ee460074 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc= -github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= +github.com/anchore/go-struct-converter v0.0.0-20240925125616-a0883641c664 h1:TcUCZsLGIXJbqo9z9VX436XdpIyZ5Cs3b8XTIp+jRxs= +github.com/anchore/go-struct-converter v0.0.0-20240925125616-a0883641c664/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -7,10 +7,10 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/spdx/gordf v0.0.0-20201111095634-7098f93598fb h1:bLo8hvc8XFm9J47r690TUKBzcjSWdJDxmjXJZ+/f92U= -github.com/spdx/gordf v0.0.0-20201111095634-7098f93598fb/go.mod h1:uKWaldnbMnjsSAXRurWqqrdyZen1R7kxl8TkmWk2OyM= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/spdx/gordf v0.0.0-20250128162952-000978ccd6fb h1:7G2Czq97VORM5xNRrD8tSQdhoXPRs8s+Otlc7st9TS0= +github.com/spdx/gordf v0.0.0-20250128162952-000978ccd6fb/go.mod h1:uKWaldnbMnjsSAXRurWqqrdyZen1R7kxl8TkmWk2OyM= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/spdx/v3/v3_0/model.go b/spdx/v3/v3_0/model.go index e1ca5e99..590211a2 100644 --- a/spdx/v3/v3_0/model.go +++ b/spdx/v3/v3_0/model.go @@ -1,11778 +1,4315 @@ -// Code generated by -m. DO NOT EDIT. +// This file was automatically generated by __main__.py. DO NOT MANUALLY MODIFY IT // -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: 0BSD package v3_0 import ( - "encoding/json" - "errors" - "fmt" - "io" - "path" + "iter" "reflect" - "strings" + "time" ) -// ldType is a 0-size data holder property type for type-level linked data -type ldType struct{} - -// ldContext is the holder for all known LD contexts and required definitions -type ldContext map[string]*serializationContext - -// RegisterTypes registers types to be used when serializing/deserialising documents -func (c ldContext) RegisterTypes(contextUrl string, types ...any) ldContext { - ctx := c[contextUrl] - if ctx == nil { - ctx = &serializationContext{ - contextUrl: contextUrl, - typeAlias: "type", // FIXME this needs to come from the LD context - iriToType: map[string]*typeContext{}, - typeToContext: map[reflect.Type]*typeContext{}, - } - c[contextUrl] = ctx - } - for _, typ := range types { - ctx.registerType(typ) - } - return c -} - -// IRIMap registers compact IRIs for the given type -func (c ldContext) IRIMap(contextUrl string, typ any, nameMap map[string]string) ldContext { - c.RegisterTypes(contextUrl) // ensure there is a context created - ctx := c[contextUrl] - - t := reflect.TypeOf(typ) - t = baseType(t) // types should be passed as pointers; we want the base types - tc := ctx.typeToContext[t] - if tc == nil { - ctx.registerType(typ) - tc = ctx.typeToContext[t] - } - for iri, compact := range nameMap { - tc.iriToName[iri] = compact - tc.nameToIri[compact] = iri - } - return c -} +// A class for describing the energy consumption incurred by an AI model in +// different stages of its lifecycle. +type AiEnergyConsumption struct { + ID string -func (c ldContext) ToJSON(writer io.Writer, value any) error { - vals, err := c.toMaps(value) - if err != nil { - return err - } - enc := json.NewEncoder(writer) - enc.SetEscapeHTML(false) - return enc.Encode(vals) -} - -func (c ldContext) toMaps(o ...any) (values map[string]any, errors error) { - // the ld graph is referenced here - // traverse the go objects to output to the graph - builder := graphBuilder{ - ldc: c, - input: o, - ids: map[reflect.Value]string{}, - } + // Specifies the amount of energy consumed when finetuning the AI model that is + // being used in the AI system. + AiFinetuningEnergyConsumptions AiEnergyConsumptionDescriptionList - var err error - var context *serializationContext - for _, o := range builder.input { - context, err = builder.add(o) - if err != nil { - return nil, err - } - } + // Specifies the amount of energy consumed during inference time by an AI model + // that is being used in the AI system. + AiInferenceEnergyConsumptions AiEnergyConsumptionDescriptionList - return map[string]any{ - ldContextProp: context.contextUrl, - ldGraphProp: builder.toGraph(), - }, nil + // Specifies the amount of energy consumed when training the AI model that is + // being used in the AI system. + AiTrainingEnergyConsumptions AiEnergyConsumptionDescriptionList } -func (c ldContext) FromJSON(reader io.Reader) ([]any, error) { - vals := map[string]any{} - dec := json.NewDecoder(reader) - err := dec.Decode(&vals) - if err != nil { - return nil, err +func castAiEnergyConsumption(o any) *AiEnergyConsumption { + if o, ok := o.(AnyAiEnergyConsumption); ok { + return o.asAiEnergyConsumption() } - return c.FromMaps(vals) + return nil } -func (c ldContext) FromMaps(values map[string]any) ([]any, error) { - instances := map[string]reflect.Value{} +func (o *AiEnergyConsumption) asAiEnergyConsumption() *AiEnergyConsumption { + return o +} - var errs error - var graph []any +type AnyAiEnergyConsumption interface { + asAiEnergyConsumption() *AiEnergyConsumption +} - context, _ := values[ldContextProp].(string) - currentContext := c[context] - if currentContext == nil { - return nil, fmt.Errorf("unknown document %s type: %v", ldContextProp, context) - } +type AiEnergyConsumptionList []AnyAiEnergyConsumption - nodes, _ := values[ldGraphProp].([]any) - if nodes == nil { - return nil, fmt.Errorf("%s array not present in root object", ldGraphProp) - } +func (o *AiEnergyConsumptionList) Append(values ...AnyAiEnergyConsumption) { + *o = append(*o, values...) +} +func (o *AiEnergyConsumptionList) Remove(value AnyAiEnergyConsumption) { remove(o, value) } - // one pass to create all the instances - for _, node := range nodes { - _, err := c.getOrCreateInstance(currentContext, instances, anyType, node) - errs = appendErr(errs, err) - } +func (o *AiEnergyConsumptionList) AiEnergyConsumptionIter() iter.Seq2[AnyAiEnergyConsumption, *AiEnergyConsumption] { + return typeIter(*o, castAiEnergyConsumption) +} - // second pass to fill in all refs - for _, node := range nodes { - got, err := c.getOrCreateInstance(currentContext, instances, anyType, node) - errs = appendErr(errs, err) - if err == nil && got.IsValid() { - graph = append(graph, got.Interface()) - } - } +// The class that helps note down the quantity of energy consumption and the unit +// used for measurement. +type AiEnergyConsumptionDescription struct { + ID string - return graph, errs + // Represents the energy quantity. + AiEnergyQuantity float64 + // Specifies the unit in which energy is measured. + AiEnergyUnit AiEnergyUnitType } -func (c ldContext) getOrCreateInstance(currentContext *serializationContext, instances map[string]reflect.Value, expectedType reflect.Type, incoming any) (reflect.Value, error) { - if isPrimitive(expectedType) { - if convertedVal := convertTo(incoming, expectedType); convertedVal != emptyValue { - return convertedVal, nil - } - return emptyValue, fmt.Errorf("unable to convert incoming value to type %v: %+v", typeName(expectedType), incoming) - } - switch incoming := incoming.(type) { - case string: - instance := c.findById(currentContext, instances, incoming) - if instance != emptyValue { - return instance, nil - } - // not found: have a complex type with string indicates an IRI or other primitive - switch expectedType.Kind() { - case reflect.Pointer: - expectedType = expectedType.Elem() - if isPrimitive(expectedType) { - val, err := c.getOrCreateInstance(currentContext, instances, expectedType, incoming) - if err != nil { - return emptyValue, err - } - instance = reflect.New(expectedType) - instance.Elem().Set(val) - return instance, nil - } - if expectedType.Kind() == reflect.Struct { - return emptyValue, fmt.Errorf("unexpected pointer reference external IRI reference: %v", incoming) - } - fallthrough - case reflect.Struct: - instance = reflect.New(expectedType) - instance = instance.Elem() - err := c.setStructProps(currentContext, instances, instance, map[string]any{ - ldIDProp: incoming, - }) - return instance, err - case reflect.Interface: - // an IRI with an interface is a reference to an unknown type, so use the closest type - newType, found := c.findExternalReferenceType(currentContext, expectedType) - if found { - instance = reflect.New(newType) - // try to return the appropriately assignable instance - if !instance.Type().AssignableTo(expectedType) { - instance = instance.Elem() - } - err := c.setStructProps(currentContext, instances, instance, map[string]any{ - ldIDProp: incoming, - }) - return instance, err - } - return emptyValue, fmt.Errorf("unable to determine external reference type while populating %v for IRI reference: %v", typeName(expectedType), incoming) - default: - } - case map[string]any: - return c.getOrCreateFromMap(currentContext, instances, incoming) +func castAiEnergyConsumptionDescription(o any) *AiEnergyConsumptionDescription { + if o, ok := o.(AnyAiEnergyConsumptionDescription); ok { + return o.asAiEnergyConsumptionDescription() } - return emptyValue, fmt.Errorf("unexpected data type: %#v", incoming) + return nil } -func convertTo(incoming any, typ reflect.Type) reflect.Value { - v := reflect.ValueOf(incoming) - if v.CanConvert(typ) { - return v.Convert(typ) - } - return emptyValue +func (o *AiEnergyConsumptionDescription) asAiEnergyConsumptionDescription() *AiEnergyConsumptionDescription { + return o } -func (c ldContext) findById(_ *serializationContext, instances map[string]reflect.Value, incoming string) reflect.Value { - inst, ok := instances[incoming] - if ok { - return inst - } - return emptyValue +type AnyAiEnergyConsumptionDescription interface { + asAiEnergyConsumptionDescription() *AiEnergyConsumptionDescription } -func (c ldContext) getOrCreateFromMap(currentContext *serializationContext, instances map[string]reflect.Value, incoming map[string]any) (reflect.Value, error) { - typ, ok := incoming[ldTypeProp].(string) - if !ok && currentContext.typeAlias != "" { - typ, ok = incoming[currentContext.typeAlias].(string) - } - if !ok { - return emptyValue, fmt.Errorf("not a string") - } - - t, ok := currentContext.iriToType[typ] - if !ok { - return emptyValue, fmt.Errorf("don't have type: %v", typ) - } - - id, _ := incoming[ldIDProp].(string) - if id == "" && t.idProp != "" { - id, _ = incoming[t.idProp].(string) - } - inst, ok := instances[id] - if !ok { - inst = reflect.New(baseType(t.typ)) // New(T) returns *T - if id != "" { - // only set instance references when an ID is provided - instances[id] = inst - } - } +type AiEnergyConsumptionDescriptionList []AnyAiEnergyConsumptionDescription - // valid type, make a new one and fill it from the incoming maps - return inst, c.fill(currentContext, instances, inst, incoming) +func (o *AiEnergyConsumptionDescriptionList) Append(values ...AnyAiEnergyConsumptionDescription) { + *o = append(*o, values...) +} +func (o *AiEnergyConsumptionDescriptionList) Remove(value AnyAiEnergyConsumptionDescription) { + remove(o, value) } -func (c ldContext) fill(currentContext *serializationContext, instances map[string]reflect.Value, instance reflect.Value, incoming any) error { - switch incoming := incoming.(type) { - case string: - inst := c.findById(currentContext, instances, incoming) - if inst != emptyValue { - return c.setValue(currentContext, instances, instance, inst) - } - // should be an incoming ID if string - return c.setValue(currentContext, instances, instance, map[string]any{ - ldIDProp: incoming, - }) - case map[string]any: - return c.setStructProps(currentContext, instances, instance, incoming) - } - return fmt.Errorf("unsupported incoming data type: %#v attempting to set instance: %#v", incoming, instance.Interface()) +func (o *AiEnergyConsumptionDescriptionList) AiEnergyConsumptionDescriptionIter() iter.Seq2[AnyAiEnergyConsumptionDescription, *AiEnergyConsumptionDescription] { + return typeIter(*o, castAiEnergyConsumptionDescription) } -func (c ldContext) setValue(currentContext *serializationContext, instances map[string]reflect.Value, target reflect.Value, incoming any) error { - var errs error - typ := target.Type() - switch typ.Kind() { - case reflect.Slice: - switch incoming := incoming.(type) { - case []any: - return c.setSliceValue(currentContext, instances, target, incoming) - } - // try mapping a single value to an incoming slice - return c.setValue(currentContext, instances, target, []any{incoming}) - case reflect.Struct: - switch incoming := incoming.(type) { - case map[string]any: - return c.setStructProps(currentContext, instances, target, incoming) - case string: - // named individuals just need an object with the iri set - return c.setStructProps(currentContext, instances, target, map[string]any{ - ldIDProp: incoming, - }) - } - case reflect.Interface, reflect.Pointer: - switch incoming := incoming.(type) { - case string, map[string]any: - inst, err := c.getOrCreateInstance(currentContext, instances, typ, incoming) - errs = appendErr(errs, err) - if inst != emptyValue { - target.Set(inst) - return nil - } - } - default: - if newVal := convertTo(incoming, typ); newVal != emptyValue { - target.Set(newVal) - } else { - errs = appendErr(errs, fmt.Errorf("unable to convert %#v to %s, dropping", incoming, typeName(typ))) - } - } - return nil +// Specifies the unit of energy consumption. +type AiEnergyUnitType struct { + ID string } -func (c ldContext) setStructProps(currentContext *serializationContext, instances map[string]reflect.Value, instance reflect.Value, incoming map[string]any) error { - var errs error - typ := instance.Type() - for typ.Kind() == reflect.Pointer { - instance = instance.Elem() - typ = instance.Type() - } - if typ.Kind() != reflect.Struct { - return fmt.Errorf("unable to set struct properties on non-struct type: %#v", instance.Interface()) - } - tc := currentContext.typeToContext[typ] - for i := 0; i < typ.NumField(); i++ { - field := typ.Field(i) - if skipField(field) { - continue - } - fieldVal := instance.Field(i) +// Kilowatt-hour. +var AiEnergyUnitType_KilowattHour = AiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/kilowattHour"} - propIRI := field.Tag.Get(propIriTag) - if propIRI == "" { - continue - } - incomingVal, ok := incoming[propIRI] - if !ok { - compactIRI := field.Tag.Get(propIriCompactTag) - if compactIRI != "" { - incomingVal, ok = incoming[compactIRI] - } - } - if !ok { - continue - } - // don't set blank node IDs, these will be regenerated on output - if propIRI == ldIDProp { - if tc != nil { - if str, ok := incomingVal.(string); ok { - if fullIRI, ok := tc.nameToIri[str]; ok { - incomingVal = fullIRI - } - } - } - if isBlankNodeID(incomingVal) { - continue - } - } - errs = appendErr(errs, c.setValue(currentContext, instances, fieldVal, incomingVal)) - } - return errs -} +// Megajoule. +var AiEnergyUnitType_Megajoule = AiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/megajoule"} -func (c ldContext) setSliceValue(currentContext *serializationContext, instances map[string]reflect.Value, target reflect.Value, incoming []any) error { - var errs error - sliceType := target.Type() - if sliceType.Kind() != reflect.Slice { - return fmt.Errorf("expected slice, got: %#v", target) - } - sz := len(incoming) - if sz > 0 { - elemType := sliceType.Elem() - newSlice := reflect.MakeSlice(sliceType, 0, sz) - for i := 0; i < sz; i++ { - incomingValue := incoming[i] - if incomingValue == nil { - continue // don't allow null values - } - newItemValue, err := c.getOrCreateInstance(currentContext, instances, elemType, incomingValue) - errs = appendErr(errs, err) - if newItemValue != emptyValue { - // validate we can actually set the type - if newItemValue.Type().AssignableTo(elemType) { - newSlice = reflect.Append(newSlice, newItemValue) - } - } - } - target.Set(newSlice) - } - return errs -} +// Any other units of energy measurement. +var AiEnergyUnitType_Other = AiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/other"} -func (c ldContext) findExternalReferenceType(currentContext *serializationContext, expectedType reflect.Type) (reflect.Type, bool) { - tc := currentContext.typeToContext[expectedType] - if tc != nil { - return tc.typ, true - } - bestMatch := anyType - for t := range currentContext.typeToContext { - if t.Kind() != reflect.Struct { - continue - } - // the type with the fewest fields assignable to the target is a good candidate to be an abstract type - if reflect.PointerTo(t).AssignableTo(expectedType) && (bestMatch == anyType || bestMatch.NumField() > t.NumField()) { - bestMatch = t - } - } - if bestMatch != anyType { - currentContext.typeToContext[expectedType] = &typeContext{ - typ: bestMatch, - } - return bestMatch, true - } - return anyType, false +// Specifies the safety risk level. +type AiSafetyRiskAssessmentType struct { + ID string } -func skipField(field reflect.StructField) bool { - return field.Type.Size() == 0 -} +// The second-highest level of risk posed by an AI system. +var AiSafetyRiskAssessmentType_High = AiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/high"} -func typeName(t reflect.Type) string { - switch { - case isPointer(t): - return "*" + typeName(t.Elem()) - case isSlice(t): - return "[]" + typeName(t.Elem()) - case isMap(t): - return "map[" + typeName(t.Key()) + "]" + typeName(t.Elem()) - case isPrimitive(t): - return t.Name() - } - return path.Base(t.PkgPath()) + "." + t.Name() -} +// Low/no risk is posed by an AI system. +var AiSafetyRiskAssessmentType_Low = AiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/low"} -func isSlice(t reflect.Type) bool { - return t.Kind() == reflect.Slice -} +// The third-highest level of risk posed by an AI system. +var AiSafetyRiskAssessmentType_Medium = AiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/medium"} -func isMap(t reflect.Type) bool { - return t.Kind() == reflect.Map -} +// The highest level of risk posed by an AI system. +var AiSafetyRiskAssessmentType_Serious = AiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/serious"} -func isPointer(t reflect.Type) bool { - return t.Kind() == reflect.Pointer +// Specifies the type of an annotation. +type AnnotationType struct { + ID string } -func isPrimitive(t reflect.Type) bool { - switch t.Kind() { - case reflect.String, - reflect.Int, - reflect.Int8, - reflect.Int16, - reflect.Int32, - reflect.Int64, - reflect.Uint, - reflect.Uint8, - reflect.Uint16, - reflect.Uint32, - reflect.Uint64, - reflect.Float32, - reflect.Float64, - reflect.Bool: - return true - default: - return false - } -} +// Used to store extra information about an Element which is not part of a review (e.g. extra information provided during the creation of the Element). +var AnnotationType_Other = AnnotationType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType/other"} -const ( - ldIDProp = "@id" - ldTypeProp = "@type" - ldContextProp = "@context" - ldGraphProp = "@graph" - typeIriTag = "iri" - typeIriCompactTag = "iri-compact" - propIriTag = "iri" - propIriCompactTag = "iri-compact" - typeIdPropTag = "id-prop" - propIsRequiredTag = "required" -) +// Used when someone reviews the Element. +var AnnotationType_Review = AnnotationType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType/review"} -var ( - emptyValue reflect.Value - anyType = reflect.TypeOf((*any)(nil)).Elem() -) +// Provides information about the creation of the Element. +type CreationInfo struct { + ID string -type typeContext struct { - typ reflect.Type - iri string - compact string - idProp string - iriToName map[string]string - nameToIri map[string]string -} - -type serializationContext struct { - contextUrl string - typeAlias string - iriToType map[string]*typeContext - typeToContext map[reflect.Type]*typeContext -} - -func fieldByType[T any](t reflect.Type) (reflect.StructField, bool) { - var v T - typ := reflect.TypeOf(v) - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if f.Type == typ { - return f, true - } - } - return reflect.StructField{}, false -} + // Provide consumers with comments by the creator of the Element about the + // Element. + Comment string + // Identifies when the Element was originally created. + Created time.Time + // Identifies who or what created the Element. + CreatedBys AgentList -func (m *serializationContext) registerType(instancePointer any) { - t := reflect.TypeOf(instancePointer) - t = baseType(t) // types should be passed as pointers; we want the base types + // Identifies the tooling that was used during the creation of the Element. + CreatedUsings ToolList - tc := m.typeToContext[t] - if tc != nil { - return // already registered - } - tc = &typeContext{ - typ: t, - iriToName: map[string]string{}, - nameToIri: map[string]string{}, - } - meta, ok := fieldByType[ldType](t) - if ok { - tc.iri = meta.Tag.Get(typeIriTag) - tc.compact = meta.Tag.Get(typeIriCompactTag) - tc.idProp = meta.Tag.Get(typeIdPropTag) - } - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if !isIdField(f) { - continue - } - compactIdProp := f.Tag.Get(typeIriCompactTag) - if compactIdProp != "" { - tc.idProp = compactIdProp - } - } - m.iriToType[tc.iri] = tc - m.iriToType[tc.compact] = tc - m.typeToContext[t] = tc + // Provides a reference number that can be used to understand how to parse and + // interpret an Element. + SpecVersion string } -// appendErr appends errors, flattening joined errors -func appendErr(err error, errs ...error) error { - if joined, ok := err.(interface{ Unwrap() []error }); ok { - return errors.Join(append(joined.Unwrap(), errs...)...) +func castCreationInfo(o any) *CreationInfo { + if o, ok := o.(AnyCreationInfo); ok { + return o.asCreationInfo() } - if err == nil { - return errors.Join(errs...) - } - return errors.Join(append([]error{err}, errs...)...) + return nil } -// baseType returns the base type if this is a pointer or interface -func baseType(t reflect.Type) reflect.Type { - switch t.Kind() { - case reflect.Pointer, reflect.Interface: - return baseType(t.Elem()) - default: - return t - } +func (o *CreationInfo) asCreationInfo() *CreationInfo { + return o } -// isBlankNodeID indicates this is a blank node ID, e.g. _:CreationInfo-1 -func isBlankNodeID(val any) bool { - if val, ok := val.(string); ok { - return strings.HasPrefix(val, "_:") - } - return false +type AnyCreationInfo interface { + asCreationInfo() *CreationInfo } -type graphBuilder struct { - ldc ldContext - input []any - graph []any - idPrefix string - nextID map[reflect.Type]int - ids map[reflect.Value]string -} +type CreationInfoList []AnyCreationInfo + +func (o *CreationInfoList) Append(values ...AnyCreationInfo) { *o = append(*o, values...) } +func (o *CreationInfoList) Remove(value AnyCreationInfo) { remove(o, value) } -func (b *graphBuilder) toGraph() []any { - return b.graph +func (o *CreationInfoList) CreationInfoIter() iter.Seq2[AnyCreationInfo, *CreationInfo] { + return typeIter(*o, castCreationInfo) } -func (b *graphBuilder) add(o any) (context *serializationContext, err error) { - v := reflect.ValueOf(o) - if v.Type().Kind() != reflect.Pointer { - if v.CanAddr() { - v = v.Addr() - } else { - newV := reflect.New(v.Type()) - newV.Elem().Set(v) - v = newV - } - } - val, err := b.toValue(v) - // objects with IDs get added to the graph during object traversal - if _, isTopLevel := val.(map[string]any); isTopLevel && err == nil { - b.graph = append(b.graph, val) - } - ctx := b.findContext(v.Type()) - return ctx, err +// A key with an associated value. +type DictionaryEntry struct { + ID string + + // A key used in a generic key-value pair. + Key string + // A value used in a generic key-value pair. + Value string } -func (b *graphBuilder) findContext(t reflect.Type) *serializationContext { - t = baseType(t) // object may be a pointer, but we want the base types - for _, context := range b.ldc { - for _, typ := range context.iriToType { - if t == typ.typ { - return context - } - } +func castDictionaryEntry(o any) *DictionaryEntry { + if o, ok := o.(AnyDictionaryEntry); ok { + return o.asDictionaryEntry() } return nil } -func (b *graphBuilder) toStructMap(v reflect.Value) (value any, err error) { - t := v.Type() - if t.Kind() != reflect.Struct { - return nil, fmt.Errorf("expected struct type, got: %v", stringify(v)) - } - - meta, ok := fieldByType[ldType](t) - if !ok { - return nil, fmt.Errorf("struct does not have LDType metadata: %v", stringify(v)) - } - - iri := meta.Tag.Get(typeIriCompactTag) - if iri == "" { - iri = meta.Tag.Get(typeIriTag) - } +func (o *DictionaryEntry) asDictionaryEntry() *DictionaryEntry { + return o +} - context := b.findContext(t) - tc := context.typeToContext[t] +type AnyDictionaryEntry interface { + asDictionaryEntry() *DictionaryEntry +} - typeProp := ldTypeProp - if context.typeAlias != "" { - typeProp = context.typeAlias - } - out := map[string]any{ - typeProp: iri, - } +type DictionaryEntryList []AnyDictionaryEntry - hasValues := false - id := "" +func (o *DictionaryEntryList) Append(values ...AnyDictionaryEntry) { *o = append(*o, values...) } +func (o *DictionaryEntryList) Remove(value AnyDictionaryEntry) { remove(o, value) } - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if skipField(f) { - continue - } +func (o *DictionaryEntryList) DictionaryEntryIter() iter.Seq2[AnyDictionaryEntry, *DictionaryEntry] { + return typeIter(*o, castDictionaryEntry) +} - prop := f.Tag.Get(propIriCompactTag) - if prop == "" { - prop = f.Tag.Get(propIriTag) - } +// Base domain class from which all other SPDX-3.0 domain classes derive. +type Element struct { + ID string - fieldV := v.Field(i) + // Provide consumers with comments by the creator of the Element about the + // Element. + Comment string + // Provides information about the creation of the Element. + CreationInfo AnyCreationInfo - if !isRequired(f) && isEmpty(fieldV) { - continue - } + // Provides a detailed description of the Element. + Description string + // Specifies an Extension characterization of some aspect of an Element. + Extensions ExtensionExtensionList - val, err := b.toValue(fieldV) - if err != nil { - return nil, err - } + // Provides a reference to a resource outside the scope of SPDX-3.0 content + // that uniquely identifies an Element. + ExternalIdentifiers ExternalIdentifierList - if isIdField(f) { - id, _ = val.(string) - if id == "" { - // if this struct does not have an ID set, and does not have multiple references, - // it is output inline, it does not need an ID, but does need an ID - // when it is moved to the top-level graph and referenced elsewhere - if !b.hasMultipleReferences(v.Addr()) { - continue - } - val, _ = b.ensureID(v.Addr()) - } else if tc != nil { - // compact named IRIs - if _, ok := tc.iriToName[id]; ok { - id = tc.iriToName[id] - } - } - } else { - hasValues = true - } + // Points to a resource outside the scope of the SPDX-3.0 content + // that provides additional characteristics of an Element. + ExternalRefs ExternalRefList - out[prop] = val - } + // Identifies the name of an Element as designated by the creator. + Name string + // A short description of an Element. + Summary string + // Provides an IntegrityMethod with which the integrity of an Element can be + // asserted. + VerifiedUsings IntegrityMethodList +} - if id != "" && !hasValues { - // if we _only_ have an ID set and no other values, consider this a named individual - return id, nil +func castElement(o any) *Element { + if o, ok := o.(AnyElement); ok { + return o.asElement() } - - return out, nil + return nil } -func isIdField(f reflect.StructField) bool { - return f.Tag.Get(propIriTag) == ldIDProp +func (o *Element) asElement() *Element { + return o } -func isEmpty(v reflect.Value) bool { - return !v.IsValid() || v.IsZero() +type AnyElement interface { + asElement() *Element } -func isRequired(f reflect.StructField) bool { - if isIdField(f) { - return true - } - required := f.Tag.Get(propIsRequiredTag) - return required != "" && !strings.EqualFold(required, "false") -} +type ElementList []AnyElement -func (b *graphBuilder) toValue(v reflect.Value) (any, error) { - if !v.IsValid() { - return nil, nil - } +func (o *ElementList) Append(values ...AnyElement) { *o = append(*o, values...) } +func (o *ElementList) Remove(value AnyElement) { remove(o, value) } - switch v.Type().Kind() { - case reflect.Interface: - return b.toValue(v.Elem()) - case reflect.Pointer: - if v.IsNil() { - return nil, nil - } - if !b.hasMultipleReferences(v) { - return b.toValue(v.Elem()) - } - return b.ensureID(v) - case reflect.Struct: - return b.toStructMap(v) - case reflect.Slice: - var out []any - for i := 0; i < v.Len(); i++ { - val, err := b.toValue(v.Index(i)) - if err != nil { - return nil, err - } - out = append(out, val) - } - return out, nil - case reflect.String: - return v.String(), nil - default: - if v.CanInterface() { - return v.Interface(), nil - } - return nil, fmt.Errorf("unable to convert value to maps: %v", stringify(v)) - } +func (o *ElementList) ElementIter() iter.Seq2[AnyElement, *Element] { return typeIter(*o, castElement) } +func (o *ElementList) ElementCollectionIter() iter.Seq2[AnyElement, *ElementCollection] { + return typeIter(*o, castElementCollection) } - -func (b *graphBuilder) ensureID(ptr reflect.Value) (string, error) { - if ptr.Type().Kind() != reflect.Pointer { - return "", fmt.Errorf("expected pointer, got: %v", stringify(ptr)) - } - if id, ok := b.ids[ptr]; ok { - return id, nil - } - - v := ptr.Elem() - t := v.Type() - - id, err := b.getID(v) - if err != nil { - return "", err - } - if id == "" { - if b.nextID == nil { - b.nextID = map[reflect.Type]int{} - } - nextID := b.nextID[t] + 1 - b.nextID[t] = nextID - id = fmt.Sprintf("_:%s-%v", t.Name(), nextID) - } - b.ids[ptr] = id - val, err := b.toValue(v) - if err != nil { - return "", err - } - b.graph = append(b.graph, val) - return id, nil +func (o *ElementList) IndividualElementIter() iter.Seq2[AnyElement, *IndividualElement] { + return typeIter(*o, castIndividualElement) } - -func (b *graphBuilder) getID(v reflect.Value) (string, error) { - t := v.Type() - if t.Kind() != reflect.Struct { - return "", fmt.Errorf("expected struct, got: %v", stringify(v)) - } - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if isIdField(f) { - fv := v.Field(i) - if f.Type.Kind() != reflect.String { - return "", fmt.Errorf("invalid type for ID field %v in: %v", f, stringify(v)) - } - return fv.String(), nil - } - } - return "", nil +func (o *ElementList) RelationshipIter() iter.Seq2[AnyElement, *Relationship] { + return typeIter(*o, castRelationship) } - -// hasMultipleReferences returns true if the ptr value has multiple references in the input slice -func (b *graphBuilder) hasMultipleReferences(ptr reflect.Value) bool { - if !ptr.IsValid() { - return false - } - count := 0 - visited := map[reflect.Value]struct{}{} - for _, v := range b.input { - count += refCountR(ptr, visited, reflect.ValueOf(v)) - if count > 1 { - return true - } - } - return false +func (o *ElementList) SpdxDocumentIter() iter.Seq2[AnyElement, *SpdxDocument] { + return typeIter(*o, castSpdxDocument) } - -// refCount returns the reference count of the value in the container object -func refCount(find any, container any) int { - visited := map[reflect.Value]struct{}{} - ptrV := reflect.ValueOf(find) - if !ptrV.IsValid() { - return 0 - } - return refCountR(ptrV, visited, reflect.ValueOf(container)) +func (o *ElementList) ToolIter() iter.Seq2[AnyElement, *Tool] { return typeIter(*o, castTool) } +func (o *ElementList) ExpandedlicensingLicenseAdditionIter() iter.Seq2[AnyElement, *ExpandedlicensingLicenseAddition] { + return typeIter(*o, castExpandedlicensingLicenseAddition) } - -// refCountR recursively searches for the value, find, in the value v -func refCountR(find reflect.Value, visited map[reflect.Value]struct{}, v reflect.Value) int { - if find.Equal(v) { - return 1 - } - if !v.IsValid() { - return 0 - } - if _, ok := visited[v]; ok { - return 0 - } - visited[v] = struct{}{} - switch v.Kind() { - case reflect.Interface: - return refCountR(find, visited, v.Elem()) - case reflect.Pointer: - if v.IsNil() { - return 0 - } - return refCountR(find, visited, v.Elem()) - case reflect.Struct: - count := 0 - for i := 0; i < v.NumField(); i++ { - count += refCountR(find, visited, v.Field(i)) - } - return count - case reflect.Slice: - count := 0 - for i := 0; i < v.Len(); i++ { - count += refCountR(find, visited, v.Index(i)) - } - return count - default: - return 0 - } +func (o *ElementList) ExpandedlicensingListedLicenseExceptionIter() iter.Seq2[AnyElement, *ExpandedlicensingListedLicenseException] { + return typeIter(*o, castExpandedlicensingListedLicenseException) } - -func stringify(o any) string { - if v, ok := o.(reflect.Value); ok { - if !v.IsValid() { - return "invalid value" - } - if !v.IsZero() && v.CanInterface() { - o = v.Interface() - } - } - return fmt.Sprintf("%#v", o) +func (o *ElementList) SecurityVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVulnAssessmentRelationship) } - -type IEnergyConsumption interface { - - // GetFinetuningEnergyConsumption specifies the amount of energy consumed when finetuning the AI model that is - // being used in the AI system. - GetFinetuningEnergyConsumption() []IEnergyConsumptionDescription - - SetFinetuningEnergyConsumption(...IEnergyConsumptionDescription) - - // GetInferenceEnergyConsumption specifies the amount of energy consumed during inference time by an AI model - // that is being used in the AI system. - GetInferenceEnergyConsumption() []IEnergyConsumptionDescription - - SetInferenceEnergyConsumption(...IEnergyConsumptionDescription) - - // GetTrainingEnergyConsumption specifies the amount of energy consumed when training the AI model that is - // being used in the AI system. - GetTrainingEnergyConsumption() []IEnergyConsumptionDescription - - SetTrainingEnergyConsumption(...IEnergyConsumptionDescription) +func (o *ElementList) SimplelicensingAnyLicenseInfoIter() iter.Seq2[AnyElement, *SimplelicensingAnyLicenseInfo] { + return typeIter(*o, castSimplelicensingAnyLicenseInfo) } - -type EnergyConsumption struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/EnergyConsumption" iri-compact:"ai_EnergyConsumption"` - - Iri string `iri:"@id"` - - // FinetuningEnergyConsumption specifies the amount of energy consumed when finetuning the AI model that is - // being used in the AI system. - FinetuningEnergyConsumption []IEnergyConsumptionDescription `iri:"https://spdx.org/rdf/3.0.0/terms/AI/finetuningEnergyConsumption" iri-compact:"ai_finetuningEnergyConsumption"` - // InferenceEnergyConsumption specifies the amount of energy consumed during inference time by an AI model - // that is being used in the AI system. - InferenceEnergyConsumption []IEnergyConsumptionDescription `iri:"https://spdx.org/rdf/3.0.0/terms/AI/inferenceEnergyConsumption" iri-compact:"ai_inferenceEnergyConsumption"` - // TrainingEnergyConsumption specifies the amount of energy consumed when training the AI model that is - // being used in the AI system. - TrainingEnergyConsumption []IEnergyConsumptionDescription `iri:"https://spdx.org/rdf/3.0.0/terms/AI/trainingEnergyConsumption" iri-compact:"ai_trainingEnergyConsumption"` +func (o *ElementList) SimplelicensingLicenseExpressionIter() iter.Seq2[AnyElement, *SimplelicensingLicenseExpression] { + return typeIter(*o, castSimplelicensingLicenseExpression) } - -func NewEnergyConsumption() IEnergyConsumption { - return &EnergyConsumption{} +func (o *ElementList) SimplelicensingSimpleLicensingTextIter() iter.Seq2[AnyElement, *SimplelicensingSimpleLicensingText] { + return typeIter(*o, castSimplelicensingSimpleLicensingText) } - -func (o *EnergyConsumption) GetFinetuningEnergyConsumption() []IEnergyConsumptionDescription { - return o.FinetuningEnergyConsumption +func (o *ElementList) BuildBuildIter() iter.Seq2[AnyElement, *BuildBuild] { + return typeIter(*o, castBuildBuild) } -func (o *EnergyConsumption) SetFinetuningEnergyConsumption(v ...IEnergyConsumptionDescription) { - o.FinetuningEnergyConsumption = v +func (o *ElementList) AgentIter() iter.Seq2[AnyElement, *Agent] { return typeIter(*o, castAgent) } +func (o *ElementList) AnnotationIter() iter.Seq2[AnyElement, *Annotation] { + return typeIter(*o, castAnnotation) } -func (o *EnergyConsumption) GetInferenceEnergyConsumption() []IEnergyConsumptionDescription { - return o.InferenceEnergyConsumption +func (o *ElementList) ArtifactIter() iter.Seq2[AnyElement, *Artifact] { + return typeIter(*o, castArtifact) } -func (o *EnergyConsumption) SetInferenceEnergyConsumption(v ...IEnergyConsumptionDescription) { - o.InferenceEnergyConsumption = v +func (o *ElementList) BundleIter() iter.Seq2[AnyElement, *Bundle] { return typeIter(*o, castBundle) } +func (o *ElementList) LifecycleScopedRelationshipIter() iter.Seq2[AnyElement, *LifecycleScopedRelationship] { + return typeIter(*o, castLifecycleScopedRelationship) } -func (o *EnergyConsumption) GetTrainingEnergyConsumption() []IEnergyConsumptionDescription { - return o.TrainingEnergyConsumption +func (o *ElementList) OrganizationIter() iter.Seq2[AnyElement, *Organization] { + return typeIter(*o, castOrganization) } -func (o *EnergyConsumption) SetTrainingEnergyConsumption(v ...IEnergyConsumptionDescription) { - o.TrainingEnergyConsumption = v +func (o *ElementList) PersonIter() iter.Seq2[AnyElement, *Person] { return typeIter(*o, castPerson) } +func (o *ElementList) SoftwareAgentIter() iter.Seq2[AnyElement, *SoftwareAgent] { + return typeIter(*o, castSoftwareAgent) } - -type IEnergyConsumptionDescription interface { - - // GetEnergyQuantity represents the energy quantity. - GetEnergyQuantity() float64 - - SetEnergyQuantity(float64) - - // GetEnergyUnit specifies the unit in which energy is measured. - GetEnergyUnit() EnergyUnitType - - SetEnergyUnit(EnergyUnitType) +func (o *ElementList) ExpandedlicensingConjunctiveLicenseSetIter() iter.Seq2[AnyElement, *ExpandedlicensingConjunctiveLicenseSet] { + return typeIter(*o, castExpandedlicensingConjunctiveLicenseSet) } - -type EnergyConsumptionDescription struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/EnergyConsumptionDescription" iri-compact:"ai_EnergyConsumptionDescription"` - - Iri string `iri:"@id"` - - // EnergyQuantity represents the energy quantity. - EnergyQuantity float64 `iri:"https://spdx.org/rdf/3.0.0/terms/AI/energyQuantity" iri-compact:"ai_energyQuantity"` - // EnergyUnit specifies the unit in which energy is measured. - EnergyUnit EnergyUnitType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/energyUnit" iri-compact:"ai_energyUnit"` +func (o *ElementList) ExpandedlicensingCustomLicenseAdditionIter() iter.Seq2[AnyElement, *ExpandedlicensingCustomLicenseAddition] { + return typeIter(*o, castExpandedlicensingCustomLicenseAddition) } - -func NewEnergyConsumptionDescription() IEnergyConsumptionDescription { - return &EnergyConsumptionDescription{} +func (o *ElementList) ExpandedlicensingDisjunctiveLicenseSetIter() iter.Seq2[AnyElement, *ExpandedlicensingDisjunctiveLicenseSet] { + return typeIter(*o, castExpandedlicensingDisjunctiveLicenseSet) } - -func (o *EnergyConsumptionDescription) GetEnergyQuantity() float64 { - return o.EnergyQuantity +func (o *ElementList) ExpandedlicensingExtendableLicenseIter() iter.Seq2[AnyElement, *ExpandedlicensingExtendableLicense] { + return typeIter(*o, castExpandedlicensingExtendableLicense) } -func (o *EnergyConsumptionDescription) SetEnergyQuantity(v float64) { - o.EnergyQuantity = v +func (o *ElementList) ExpandedlicensingIndividualLicensingInfoIter() iter.Seq2[AnyElement, *ExpandedlicensingIndividualLicensingInfo] { + return typeIter(*o, castExpandedlicensingIndividualLicensingInfo) } -func (o *EnergyConsumptionDescription) GetEnergyUnit() EnergyUnitType { - return o.EnergyUnit +func (o *ElementList) ExpandedlicensingLicenseIter() iter.Seq2[AnyElement, *ExpandedlicensingLicense] { + return typeIter(*o, castExpandedlicensingLicense) } -func (o *EnergyConsumptionDescription) SetEnergyUnit(v EnergyUnitType) { - o.EnergyUnit = v +func (o *ElementList) ExpandedlicensingListedLicenseIter() iter.Seq2[AnyElement, *ExpandedlicensingListedLicense] { + return typeIter(*o, castExpandedlicensingListedLicense) } - -type EnergyUnitType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType" iri-compact:"ai_EnergyUnitType"` - - Iri string `iri:"@id"` +func (o *ElementList) ExpandedlicensingOrLaterOperatorIter() iter.Seq2[AnyElement, *ExpandedlicensingOrLaterOperator] { + return typeIter(*o, castExpandedlicensingOrLaterOperator) } - -var ( - EnergyUnitType_KilowattHour = EnergyUnitType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/kilowattHour"} - EnergyUnitType_Megajoule = EnergyUnitType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/megajoule"} - EnergyUnitType_Other = EnergyUnitType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/other"} -) - -type SafetyRiskAssessmentType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType" iri-compact:"ai_SafetyRiskAssessmentType"` - - Iri string `iri:"@id"` +func (o *ElementList) ExpandedlicensingWithAdditionOperatorIter() iter.Seq2[AnyElement, *ExpandedlicensingWithAdditionOperator] { + return typeIter(*o, castExpandedlicensingWithAdditionOperator) } - -var ( - SafetyRiskAssessmentType_High = SafetyRiskAssessmentType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/high"} - SafetyRiskAssessmentType_Low = SafetyRiskAssessmentType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/low"} - SafetyRiskAssessmentType_Medium = SafetyRiskAssessmentType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/medium"} - SafetyRiskAssessmentType_Serious = SafetyRiskAssessmentType{Iri: "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/serious"} -) - -type AnnotationType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/AnnotationType" iri-compact:"AnnotationType"` - - Iri string `iri:"@id"` +func (o *ElementList) SecurityCvssV2VulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityCvssV2VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV2VulnAssessmentRelationship) } - -var ( - AnnotationType_Other = AnnotationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/AnnotationType/other"} - AnnotationType_Review = AnnotationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/AnnotationType/review"} -) - -type ICreationInfo interface { - - // GetComment provide consumers with comments by the creator of the Element about the - // Element. - GetComment() string - - SetComment(string) - - // GetCreated identifies when the Element was originally created. - GetCreated() string - - SetCreated(string) - - // GetCreatedBy identifies who or what created the Element. - GetCreatedBy() []IAgent - - SetCreatedBy(...IAgent) - - // GetCreatedUsing identifies the tooling that was used during the creation of the Element. - GetCreatedUsing() []ITool - - SetCreatedUsing(...ITool) - - // GetSpecVersion provides a reference number that can be used to understand how to parse and interpret an Element. - GetSpecVersion() string - - SetSpecVersion(string) +func (o *ElementList) SecurityCvssV3VulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityCvssV3VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV3VulnAssessmentRelationship) } - -type CreationInfo struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/CreationInfo" iri-compact:"CreationInfo"` - - Iri string `iri:"@id"` - - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // Created identifies when the Element was originally created. - Created string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/created" iri-compact:"created"` - // CreatedBy identifies who or what created the Element. - CreatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/createdBy" iri-compact:"createdBy"` - // CreatedUsing identifies the tooling that was used during the creation of the Element. - CreatedUsing []ITool `iri:"https://spdx.org/rdf/3.0.0/terms/Core/createdUsing" iri-compact:"createdUsing"` - // SpecVersion provides a reference number that can be used to understand how to parse and interpret an Element. - SpecVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/specVersion" iri-compact:"specVersion"` +func (o *ElementList) SecurityCvssV4VulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityCvssV4VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV4VulnAssessmentRelationship) } - -func NewCreationInfo() ICreationInfo { - return &CreationInfo{} +func (o *ElementList) SecurityEpssVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityEpssVulnAssessmentRelationship] { + return typeIter(*o, castSecurityEpssVulnAssessmentRelationship) } - -func (o *CreationInfo) GetComment() string { - return o.Comment +func (o *ElementList) SecurityExploitCatalogVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityExploitCatalogVulnAssessmentRelationship] { + return typeIter(*o, castSecurityExploitCatalogVulnAssessmentRelationship) +} +func (o *ElementList) SecuritySsvcVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecuritySsvcVulnAssessmentRelationship] { + return typeIter(*o, castSecuritySsvcVulnAssessmentRelationship) +} +func (o *ElementList) SecurityVexVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVexVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexVulnAssessmentRelationship) +} +func (o *ElementList) SecurityVulnerabilityIter() iter.Seq2[AnyElement, *SecurityVulnerability] { + return typeIter(*o, castSecurityVulnerability) } -func (o *CreationInfo) SetComment(v string) { - o.Comment = v +func (o *ElementList) SoftwareSoftwareArtifactIter() iter.Seq2[AnyElement, *SoftwareSoftwareArtifact] { + return typeIter(*o, castSoftwareSoftwareArtifact) } -func (o *CreationInfo) GetCreated() string { - return o.Created +func (o *ElementList) BomIter() iter.Seq2[AnyElement, *Bom] { return typeIter(*o, castBom) } +func (o *ElementList) ExpandedlicensingCustomLicenseIter() iter.Seq2[AnyElement, *ExpandedlicensingCustomLicense] { + return typeIter(*o, castExpandedlicensingCustomLicense) } -func (o *CreationInfo) SetCreated(v string) { - o.Created = v +func (o *ElementList) SecurityVexAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVexAffectedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexAffectedVulnAssessmentRelationship) } -func (o *CreationInfo) GetCreatedBy() []IAgent { - return o.CreatedBy +func (o *ElementList) SecurityVexFixedVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVexFixedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexFixedVulnAssessmentRelationship) } -func (o *CreationInfo) SetCreatedBy(v ...IAgent) { - o.CreatedBy = v +func (o *ElementList) SecurityVexNotAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVexNotAffectedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexNotAffectedVulnAssessmentRelationship) } -func (o *CreationInfo) GetCreatedUsing() []ITool { - return o.CreatedUsing +func (o *ElementList) SecurityVexUnderInvestigationVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVexUnderInvestigationVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexUnderInvestigationVulnAssessmentRelationship) } -func (o *CreationInfo) SetCreatedUsing(v ...ITool) { - o.CreatedUsing = v +func (o *ElementList) SoftwareFileIter() iter.Seq2[AnyElement, *SoftwareFile] { + return typeIter(*o, castSoftwareFile) } -func (o *CreationInfo) GetSpecVersion() string { - return o.SpecVersion +func (o *ElementList) SoftwarePackageIter() iter.Seq2[AnyElement, *SoftwarePackage] { + return typeIter(*o, castSoftwarePackage) } -func (o *CreationInfo) SetSpecVersion(v string) { - o.SpecVersion = v +func (o *ElementList) SoftwareSbomIter() iter.Seq2[AnyElement, *SoftwareSbom] { + return typeIter(*o, castSoftwareSbom) +} +func (o *ElementList) SoftwareSnippetIter() iter.Seq2[AnyElement, *SoftwareSnippet] { + return typeIter(*o, castSoftwareSnippet) +} +func (o *ElementList) AiAIPackageIter() iter.Seq2[AnyElement, *AiAIPackage] { + return typeIter(*o, castAiAIPackage) +} +func (o *ElementList) DatasetDatasetPackageIter() iter.Seq2[AnyElement, *DatasetDatasetPackage] { + return typeIter(*o, castDatasetDatasetPackage) } -type IDictionaryEntry interface { +// A collection of Elements, not necessarily with unifying context. +type ElementCollection struct { + Element - // GetKey a key used in a generic key-value pair. - GetKey() string + // Refers to one or more Elements that are part of an ElementCollection. + Elements ElementList - SetKey(string) + // Describes one a profile which the creator of this ElementCollection intends to + // conform to. + ProfileConformances []ProfileIdentifierType + // This property is used to denote the root Element(s) of a tree of elements contained in a BOM. + RootElements ElementList +} - // GetValue a value used in a generic key-value pair. - GetValue() string +func castElementCollection(o any) *ElementCollection { + if o, ok := o.(AnyElementCollection); ok { + return o.asElementCollection() + } + return nil +} - SetValue(string) +func (o *ElementCollection) asElementCollection() *ElementCollection { + return o } -type DictionaryEntry struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/DictionaryEntry" iri-compact:"DictionaryEntry"` +type AnyElementCollection interface { + AnyElement + asElementCollection() *ElementCollection +} - Iri string `iri:"@id"` +type ElementCollectionList []AnyElementCollection - // Key a key used in a generic key-value pair. - Key string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/key" iri-compact:"key"` - // Value a value used in a generic key-value pair. - Value string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/value" iri-compact:"value"` -} +func (o *ElementCollectionList) Append(values ...AnyElementCollection) { *o = append(*o, values...) } +func (o *ElementCollectionList) Remove(value AnyElementCollection) { remove(o, value) } -func NewDictionaryEntry() IDictionaryEntry { - return &DictionaryEntry{} +func (o *ElementCollectionList) ElementCollectionIter() iter.Seq2[AnyElementCollection, *ElementCollection] { + return typeIter(*o, castElementCollection) } - -func (o *DictionaryEntry) GetKey() string { - return o.Key +func (o *ElementCollectionList) SpdxDocumentIter() iter.Seq2[AnyElementCollection, *SpdxDocument] { + return typeIter(*o, castSpdxDocument) } -func (o *DictionaryEntry) SetKey(v string) { - o.Key = v +func (o *ElementCollectionList) BundleIter() iter.Seq2[AnyElementCollection, *Bundle] { + return typeIter(*o, castBundle) } -func (o *DictionaryEntry) GetValue() string { - return o.Value +func (o *ElementCollectionList) BomIter() iter.Seq2[AnyElementCollection, *Bom] { + return typeIter(*o, castBom) } -func (o *DictionaryEntry) SetValue(v string) { - o.Value = v +func (o *ElementCollectionList) SoftwareSbomIter() iter.Seq2[AnyElementCollection, *SoftwareSbom] { + return typeIter(*o, castSoftwareSbom) } -type IElement interface { - - // GetSpdxId identifier property - GetSpdxId() string - - SetSpdxId(string) +// A reference to a resource identifier defined outside the scope of SPDX-3.0 content that uniquely identifies an Element. +type ExternalIdentifier struct { + ID string - // GetComment provide consumers with comments by the creator of the Element about the + // Provide consumers with comments by the creator of the Element about the // Element. - GetComment() string + Comment string + // Specifies the type of the external identifier. + ExternalIdentifierType ExternalIdentifierType + // Uniquely identifies an external element. + Identifier string + // Provides the location for more information regarding an external identifier. + IdentifierLocators []string + // An entity that is authorized to issue identification credentials. + IssuingAuthority string +} + +func castExternalIdentifier(o any) *ExternalIdentifier { + if o, ok := o.(AnyExternalIdentifier); ok { + return o.asExternalIdentifier() + } + return nil +} - SetComment(string) +func (o *ExternalIdentifier) asExternalIdentifier() *ExternalIdentifier { + return o +} - // GetCreationInfo provides information about the creation of the Element. - GetCreationInfo() ICreationInfo +type AnyExternalIdentifier interface { + asExternalIdentifier() *ExternalIdentifier +} - SetCreationInfo(ICreationInfo) +type ExternalIdentifierList []AnyExternalIdentifier - // GetDescription provides a detailed description of the Element. - GetDescription() string +func (o *ExternalIdentifierList) Append(values ...AnyExternalIdentifier) { *o = append(*o, values...) } +func (o *ExternalIdentifierList) Remove(value AnyExternalIdentifier) { remove(o, value) } - SetDescription(string) +func (o *ExternalIdentifierList) ExternalIdentifierIter() iter.Seq2[AnyExternalIdentifier, *ExternalIdentifier] { + return typeIter(*o, castExternalIdentifier) +} - // GetExtensions specifies an Extension characterization of some aspect of an Element. - GetExtensions() []IExtension +// Specifies the type of an external identifier. +type ExternalIdentifierType struct { + ID string +} - SetExtensions(...IExtension) +// [Common Platform Enumeration Specification 2.2](https://cpe.mitre.org/files/cpe-specification_2.2.pdf) +var ExternalIdentifierType_Cpe22 = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cpe22"} - // GetExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - GetExternalIdentifiers() []IExternalIdentifier +// [Common Platform Enumeration: Naming Specification Version 2.3](https://csrc.nist.gov/publications/detail/nistir/7695/final) +var ExternalIdentifierType_Cpe23 = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cpe23"} - SetExternalIdentifiers(...IExternalIdentifier) +// Common Vulnerabilities and Exposures identifiers, an identifier for a specific software flaw defined within the official CVE Dictionary and that conforms to the [CVE specification](https://csrc.nist.gov/glossary/term/cve_id). +var ExternalIdentifierType_Cve = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cve"} - // GetExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - GetExternalRefs() []IExternalRef +// Email address, as defined in [RFC 3696](https://datatracker.ietf.org/doc/rfc3986/) Section 3. +var ExternalIdentifierType_Email = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/email"} - SetExternalRefs(...IExternalRef) +// [Gitoid](https://www.iana.org/assignments/uri-schemes/prov/gitoid), stands for [Git Object ID](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). A gitoid of type blob is a unique hash of a binary artifact. A gitoid may represent either an [Artifact Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-identifier-types) for the software artifact or an [Input Manifest Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#input-manifest-identifier) for the software artifact's associated [Artifact Input Manifest](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-input-manifest); this ambiguity exists because the Artifact Input Manifest is itself an artifact, and the gitoid of that artifact is its valid identifier. Gitoids calculated on software artifacts (Snippet, File, or Package Elements) should be recorded in the SPDX 3.0 SoftwareArtifact's contentIdentifier property. Gitoids calculated on the Artifact Input Manifest (Input Manifest Identifier) should be recorded in the SPDX 3.0 Element's externalIdentifier property. See [OmniBOR Specification](https://github.com/omnibor/spec/), a minimalistic specification for describing software [Artifact Dependency Graphs](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-dependency-graph-adg). +var ExternalIdentifierType_Gitoid = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/gitoid"} - // GetName identifies the name of an Element as designated by the creator. - GetName() string +// Used when the type does not match any of the other options. +var ExternalIdentifierType_Other = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/other"} - SetName(string) +// Package URL, as defined in the corresponding [Annex](../../../annexes/pkg-url-specification.md) of this specification. +var ExternalIdentifierType_PackageUrl = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/packageUrl"} - // GetSummary a short description of an Element. - GetSummary() string +// Used when there is a security related identifier of unspecified type. +var ExternalIdentifierType_SecurityOther = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/securityOther"} - SetSummary(string) +// SoftWare Hash IDentifier, a persistent intrinsic identifier for digital artifacts, such as files, trees (also known as directories or folders), commits, and other objects typically found in version control systems. The format of the identifiers is defined in the [SWHID specification](https://www.swhid.org/specification/v1.1/4.Syntax) (ISO/IEC DIS 18670). They typically look like `swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2`. +var ExternalIdentifierType_Swhid = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/swhid"} - // GetVerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - GetVerifiedUsing() []IIntegrityMethod +// Concise Software Identification (CoSWID) tag, as defined in [RFC 9393](https://datatracker.ietf.org/doc/rfc9393/) Section 2.3. +var ExternalIdentifierType_Swid = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/swid"} - SetVerifiedUsing(...IIntegrityMethod) -} +// [Uniform Resource Identifier (URI) Schemes](https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml). The scheme used in order to locate a resource. +var ExternalIdentifierType_UrlScheme = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/urlScheme"} -type Element struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Element" iri-compact:"Element" id-prop:"spdxId"` +// A map of Element identifiers that are used within an SpdxDocument but defined +// external to that SpdxDocument. +type ExternalMap struct { + ID string - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be + // Artifact representing a serialization instance of SPDX data containing the + // definition of a particular Element. + DefiningArtifact AnyArtifact + + // Identifies an external Element used within an SpdxDocument but defined + // external to that SpdxDocument. + ExternalSpdxId string + // Provides an indication of where to retrieve an external Element. + LocationHint string + // Provides an IntegrityMethod with which the integrity of an Element can be // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + VerifiedUsings IntegrityMethodList } -func (o *Element) GetSpdxId() string { - return o.SpdxId -} -func (o *Element) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Element) GetComment() string { - return o.Comment -} -func (o *Element) SetComment(v string) { - o.Comment = v -} -func (o *Element) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Element) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *Element) GetDescription() string { - return o.Description -} -func (o *Element) SetDescription(v string) { - o.Description = v -} -func (o *Element) GetExtensions() []IExtension { - return o.Extensions -} -func (o *Element) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *Element) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *Element) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v +func castExternalMap(o any) *ExternalMap { + if o, ok := o.(AnyExternalMap); ok { + return o.asExternalMap() + } + return nil } -func (o *Element) GetExternalRefs() []IExternalRef { - return o.ExternalRefs + +func (o *ExternalMap) asExternalMap() *ExternalMap { + return o } -func (o *Element) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v + +type AnyExternalMap interface { + asExternalMap() *ExternalMap } -func (o *Element) GetName() string { - return o.Name + +type ExternalMapList []AnyExternalMap + +func (o *ExternalMapList) Append(values ...AnyExternalMap) { *o = append(*o, values...) } +func (o *ExternalMapList) Remove(value AnyExternalMap) { remove(o, value) } + +func (o *ExternalMapList) ExternalMapIter() iter.Seq2[AnyExternalMap, *ExternalMap] { + return typeIter(*o, castExternalMap) } -func (o *Element) SetName(v string) { - o.Name = v + +// A reference to a resource outside the scope of SPDX-3.0 content related to an Element. +type ExternalRef struct { + ID string + + // Provide consumers with comments by the creator of the Element about the + // Element. + Comment string + // Provides information about the content type of an Element or a Property. + ContentType string + // Specifies the type of the external reference. + ExternalRefType ExternalRefType + // Provides the location of an external reference. + Locators []string +} + +func castExternalRef(o any) *ExternalRef { + if o, ok := o.(AnyExternalRef); ok { + return o.asExternalRef() + } + return nil } -func (o *Element) GetSummary() string { - return o.Summary + +func (o *ExternalRef) asExternalRef() *ExternalRef { + return o } -func (o *Element) SetSummary(v string) { - o.Summary = v + +type AnyExternalRef interface { + asExternalRef() *ExternalRef } -func (o *Element) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing + +type ExternalRefList []AnyExternalRef + +func (o *ExternalRefList) Append(values ...AnyExternalRef) { *o = append(*o, values...) } +func (o *ExternalRefList) Remove(value AnyExternalRef) { remove(o, value) } + +func (o *ExternalRefList) ExternalRefIter() iter.Seq2[AnyExternalRef, *ExternalRef] { + return typeIter(*o, castExternalRef) } -func (o *Element) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v + +// Specifies the type of an external reference. +type ExternalRefType struct { + ID string } -type IElementCollection interface { - IElement +// A reference to an alternative download location. +var ExternalRefType_AltDownloadLocation = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/altDownloadLocation"} - // GetElements refers to one or more Elements that are part of an ElementCollection. - GetElements() []IElement +// A reference to an alternative web page. +var ExternalRefType_AltWebPage = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/altWebPage"} - SetElements(...IElement) +// A reference to binary artifacts related to a package. +var ExternalRefType_BinaryArtifact = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/binaryArtifact"} - // GetProfileConformance describes one a profile which the creator of this ElementCollection intends to - // conform to. - GetProfileConformance() []ProfileIdentifierType +// A reference to a Bower package. The package locator format, looks like `package#version`, is defined in the "install" section of [Bower API documentation](https://bower.io/docs/api/#install). +var ExternalRefType_Bower = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/bower"} - SetProfileConformance(...ProfileIdentifierType) +// A reference build metadata related to a published package. +var ExternalRefType_BuildMeta = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/buildMeta"} - // GetRootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. - GetRootElements() []IElement +// A reference build system used to create or publish the package. +var ExternalRefType_BuildSystem = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/buildSystem"} - SetRootElements(...IElement) -} +// A reference to a certification report for a package from an accredited/independent body. +var ExternalRefType_CertificationReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/certificationReport"} -type ElementCollection struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ElementCollection" iri-compact:"ElementCollection" id-prop:"spdxId"` +// A reference to the instant messaging system used by the maintainer for a package. +var ExternalRefType_Chat = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/chat"} - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +// A reference to a Software Composition Analysis (SCA) report. +var ExternalRefType_ComponentAnalysisReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/componentAnalysisReport"} - // Elements refers to one or more Elements that are part of an ElementCollection. - Elements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/element" iri-compact:"element"` - // ProfileConformance describes one a profile which the creator of this ElementCollection intends to - // conform to. - ProfileConformance []ProfileIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/profileConformance" iri-compact:"profileConformance"` - // RootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. - RootElements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/rootElement" iri-compact:"rootElement"` -} +// [Common Weakness Enumeration](https://csrc.nist.gov/glossary/term/common_weakness_enumeration). A reference to a source of software flaw defined within the official [CWE List](https://cwe.mitre.org/data/) that conforms to the [CWE specification](https://cwe.mitre.org/). +var ExternalRefType_Cwe = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/cwe"} -func (o *ElementCollection) GetSpdxId() string { - return o.SpdxId -} -func (o *ElementCollection) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *ElementCollection) GetComment() string { - return o.Comment -} -func (o *ElementCollection) SetComment(v string) { - o.Comment = v -} -func (o *ElementCollection) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *ElementCollection) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *ElementCollection) GetDescription() string { - return o.Description -} -func (o *ElementCollection) SetDescription(v string) { - o.Description = v -} -func (o *ElementCollection) GetExtensions() []IExtension { - return o.Extensions -} -func (o *ElementCollection) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *ElementCollection) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *ElementCollection) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *ElementCollection) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *ElementCollection) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *ElementCollection) GetName() string { - return o.Name -} -func (o *ElementCollection) SetName(v string) { - o.Name = v -} -func (o *ElementCollection) GetSummary() string { - return o.Summary -} -func (o *ElementCollection) SetSummary(v string) { - o.Summary = v -} -func (o *ElementCollection) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *ElementCollection) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} +// A reference to the documentation for a package. +var ExternalRefType_Documentation = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/documentation"} -func (o *ElementCollection) GetElements() []IElement { - return o.Elements -} -func (o *ElementCollection) SetElements(v ...IElement) { - o.Elements = v -} -func (o *ElementCollection) GetProfileConformance() []ProfileIdentifierType { - return o.ProfileConformance -} -func (o *ElementCollection) SetProfileConformance(v ...ProfileIdentifierType) { - o.ProfileConformance = v -} -func (o *ElementCollection) GetRootElements() []IElement { - return o.RootElements -} -func (o *ElementCollection) SetRootElements(v ...IElement) { - o.RootElements = v -} +// A reference to a dynamic analysis report for a package. +var ExternalRefType_DynamicAnalysisReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/dynamicAnalysisReport"} -type IExternalIdentifier interface { +// A reference to the End Of Sale (EOS) and/or End Of Life (EOL) information related to a package. +var ExternalRefType_EolNotice = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/eolNotice"} - // GetComment provide consumers with comments by the creator of the Element about the - // Element. - GetComment() string +// A reference to a export control assessment for a package. +var ExternalRefType_ExportControlAssessment = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/exportControlAssessment"} - SetComment(string) +// A reference to funding information related to a package. +var ExternalRefType_Funding = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/funding"} - // GetExternalIdentifierType specifies the type of the external identifier. - GetExternalIdentifierType() ExternalIdentifierType +// A reference to the issue tracker for a package. +var ExternalRefType_IssueTracker = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/issueTracker"} - SetExternalIdentifierType(ExternalIdentifierType) +// A reference to additional license information related to an artifact. +var ExternalRefType_License = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/license"} - // GetIdentifier uniquely identifies an external element. - GetIdentifier() string +// A reference to the mailing list used by the maintainer for a package. +var ExternalRefType_MailingList = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/mailingList"} - SetIdentifier(string) +// A reference to a Maven repository artifact. The artifact locator format is defined in the [Maven documentation](https://maven.apache.org/guides/mini/guide-naming-conventions.html) and looks like `groupId:artifactId[:version]`. +var ExternalRefType_MavenCentral = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/mavenCentral"} - // GetIdentifierLocator provides the location for more information regarding an external identifier. - GetIdentifierLocator() []string +// A reference to metrics related to package such as OpenSSF scorecards. +var ExternalRefType_Metrics = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/metrics"} - SetIdentifierLocator(...string) +// A reference to an npm package. The package locator format is defined in the [npm documentation](https://docs.npmjs.com/cli/v10/configuring-npm/package-json) and looks like `package@version`. +var ExternalRefType_Npm = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/npm"} - // GetIssuingAuthority an entity that is authorized to issue identification credentials. - GetIssuingAuthority() string +// A reference to a NuGet package. The package locator format is defined in the [NuGet documentation](https://docs.nuget.org) and looks like `package/version`. +var ExternalRefType_Nuget = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/nuget"} - SetIssuingAuthority(string) -} +// Used when the type does not match any of the other options. +var ExternalRefType_Other = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/other"} -type ExternalIdentifier struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifier" iri-compact:"ExternalIdentifier"` +// A reference to a privacy assessment for a package. +var ExternalRefType_PrivacyAssessment = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/privacyAssessment"} - Iri string `iri:"@id"` +// A reference to additional product metadata such as reference within organization's product catalog. +var ExternalRefType_ProductMetadata = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/productMetadata"} - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // ExternalIdentifierType specifies the type of the external identifier. - ExternalIdentifierType ExternalIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifierType" iri-compact:"externalIdentifierType"` - // Identifier uniquely identifies an external element. - Identifier string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/identifier" iri-compact:"identifier"` - // IdentifierLocator provides the location for more information regarding an external identifier. - IdentifierLocator []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/identifierLocator" iri-compact:"identifierLocator"` - // IssuingAuthority an entity that is authorized to issue identification credentials. - IssuingAuthority string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/issuingAuthority" iri-compact:"issuingAuthority"` -} +// A reference to a purchase order for a package. +var ExternalRefType_PurchaseOrder = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/purchaseOrder"} -func NewExternalIdentifier() IExternalIdentifier { - return &ExternalIdentifier{} -} +// A reference to a quality assessment for a package. +var ExternalRefType_QualityAssessmentReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/qualityAssessmentReport"} -func (o *ExternalIdentifier) GetComment() string { - return o.Comment -} -func (o *ExternalIdentifier) SetComment(v string) { - o.Comment = v -} -func (o *ExternalIdentifier) GetExternalIdentifierType() ExternalIdentifierType { - return o.ExternalIdentifierType -} -func (o *ExternalIdentifier) SetExternalIdentifierType(v ExternalIdentifierType) { - o.ExternalIdentifierType = v -} -func (o *ExternalIdentifier) GetIdentifier() string { - return o.Identifier -} -func (o *ExternalIdentifier) SetIdentifier(v string) { - o.Identifier = v -} -func (o *ExternalIdentifier) GetIdentifierLocator() []string { - return o.IdentifierLocator -} -func (o *ExternalIdentifier) SetIdentifierLocator(v ...string) { - o.IdentifierLocator = v -} -func (o *ExternalIdentifier) GetIssuingAuthority() string { - return o.IssuingAuthority -} -func (o *ExternalIdentifier) SetIssuingAuthority(v string) { - o.IssuingAuthority = v -} +// A reference to a published list of releases for a package. +var ExternalRefType_ReleaseHistory = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/releaseHistory"} -type ExternalIdentifierType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType" iri-compact:"ExternalIdentifierType"` - - Iri string `iri:"@id"` -} - -var ( - ExternalIdentifierType_Cpe22 = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cpe22"} - ExternalIdentifierType_Cpe23 = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cpe23"} - ExternalIdentifierType_Cve = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cve"} - ExternalIdentifierType_Email = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/email"} - ExternalIdentifierType_Gitoid = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/gitoid"} - ExternalIdentifierType_Other = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/other"} - ExternalIdentifierType_PackageUrl = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/packageUrl"} - ExternalIdentifierType_SecurityOther = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/securityOther"} - ExternalIdentifierType_Swhid = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/swhid"} - ExternalIdentifierType_Swid = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/swid"} - ExternalIdentifierType_UrlScheme = ExternalIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/urlScheme"} -) +// A reference to the release notes for a package. +var ExternalRefType_ReleaseNotes = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/releaseNotes"} -type IExternalMap interface { +// A reference to a risk assessment for a package. +var ExternalRefType_RiskAssessment = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/riskAssessment"} - // GetDefiningArtifact artifact representing a serialization instance of SPDX data containing the - // definition of a particular Element. - GetDefiningArtifact() IArtifact +// A reference to a runtime analysis report for a package. +var ExternalRefType_RuntimeAnalysisReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/runtimeAnalysisReport"} - SetDefiningArtifact(IArtifact) +// A reference to information assuring that the software is developed using security practices as defined by [NIST SP 800-218 Secure Software Development Framework (SSDF) Version 1.1](https://csrc.nist.gov/pubs/sp/800/218/final) or [CISA Secure Software Development Attestation Form](https://www.cisa.gov/resources-tools/resources/secure-software-development-attestation-form). +var ExternalRefType_SecureSoftwareAttestation = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/secureSoftwareAttestation"} - // GetExternalSpdxId identifies an external Element used within a Document but defined external to - // that Document. - GetExternalSpdxId() string +// A reference to the security adversary model for a package. +var ExternalRefType_SecurityAdversaryModel = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityAdversaryModel"} - SetExternalSpdxId(string) +// A reference to a published security advisory (where advisory as defined per [ISO 29147:2018](https://www.iso.org/standard/72311.html)) that may affect one or more elements, e.g., vendor advisories or specific NVD entries. +var ExternalRefType_SecurityAdvisory = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityAdvisory"} - // GetLocationHint provides an indication of where to retrieve an external Element. - GetLocationHint() string +// A reference to the patch or source code that fixes a vulnerability. +var ExternalRefType_SecurityFix = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityFix"} - SetLocationHint(string) +// A reference to related security information of unspecified type. +var ExternalRefType_SecurityOther = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityOther"} - // GetVerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - GetVerifiedUsing() []IIntegrityMethod +// A reference to a [penetration test](https://en.wikipedia.org/wiki/Penetration_test) report for a package. +var ExternalRefType_SecurityPenTestReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityPenTestReport"} - SetVerifiedUsing(...IIntegrityMethod) -} +// A reference to instructions for reporting newly discovered security vulnerabilities for a package. +var ExternalRefType_SecurityPolicy = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityPolicy"} -type ExternalMap struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ExternalMap" iri-compact:"ExternalMap"` +// A reference the [security threat model](https://en.wikipedia.org/wiki/Threat_model) for a package. +var ExternalRefType_SecurityThreatModel = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityThreatModel"} - Iri string `iri:"@id"` +// A reference to a social media channel for a package. +var ExternalRefType_SocialMedia = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/socialMedia"} - // DefiningArtifact artifact representing a serialization instance of SPDX data containing the - // definition of a particular Element. - DefiningArtifact IArtifact `iri:"https://spdx.org/rdf/3.0.0/terms/Core/definingArtifact" iri-compact:"definingArtifact"` - // ExternalSpdxId identifies an external Element used within a Document but defined external to - // that Document. - ExternalSpdxId string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalSpdxId" iri-compact:"externalSpdxId"` - // LocationHint provides an indication of where to retrieve an external Element. - LocationHint string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/locationHint" iri-compact:"locationHint"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` -} +// A reference to an artifact containing the sources for a package. +var ExternalRefType_SourceArtifact = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/sourceArtifact"} -func NewExternalMap() IExternalMap { - return &ExternalMap{} -} +// A reference to a static analysis report for a package. +var ExternalRefType_StaticAnalysisReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/staticAnalysisReport"} -func (o *ExternalMap) GetDefiningArtifact() IArtifact { - return o.DefiningArtifact -} -func (o *ExternalMap) SetDefiningArtifact(v IArtifact) { - o.DefiningArtifact = v -} -func (o *ExternalMap) GetExternalSpdxId() string { - return o.ExternalSpdxId -} -func (o *ExternalMap) SetExternalSpdxId(v string) { - o.ExternalSpdxId = v -} -func (o *ExternalMap) GetLocationHint() string { - return o.LocationHint -} -func (o *ExternalMap) SetLocationHint(v string) { - o.LocationHint = v -} -func (o *ExternalMap) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *ExternalMap) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v +// A reference to the software support channel or other support information for a package. +var ExternalRefType_Support = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/support"} + +// A reference to a version control system related to a software artifact. +var ExternalRefType_Vcs = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vcs"} + +// A reference to a Vulnerability Disclosure Report (VDR) which provides the software supplier's analysis and findings describing the impact (or lack of impact) that reported vulnerabilities have on packages or products in the supplier's SBOM as defined in [NIST SP 800-161 Cybersecurity Supply Chain Risk Management Practices for Systems and Organizations](https://csrc.nist.gov/pubs/sp/800/161/r1/final). +var ExternalRefType_VulnerabilityDisclosureReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vulnerabilityDisclosureReport"} + +// A reference to a Vulnerability Exploitability eXchange (VEX) statement which provides information on whether a product is impacted by a specific vulnerability in an included package and, if affected, whether there are actions recommended to remediate. See also [NTIA VEX one-page summary](https://ntia.gov/files/ntia/publications/vex_one-page_summary.pdf). +var ExternalRefType_VulnerabilityExploitabilityAssessment = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vulnerabilityExploitabilityAssessment"} + +// A mathematical algorithm that maps data of arbitrary size to a bit string. +type HashAlgorithm struct { + ID string } -type IExternalRef interface { +// Adler-32 checksum is part of the widely used zlib compression library as defined in [RFC 1950](https://datatracker.ietf.org/doc/rfc1950/) Section 2.3. +var HashAlgorithm_Adler32 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/adler32"} - // GetComment provide consumers with comments by the creator of the Element about the - // Element. - GetComment() string +// BLAKE2b algorithm with a digest size of 256, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. +var HashAlgorithm_Blake2b256 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b256"} - SetComment(string) +// BLAKE2b algorithm with a digest size of 384, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. +var HashAlgorithm_Blake2b384 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b384"} - // GetContentType specifies the media type of an Element or Property. - GetContentType() string +// BLAKE2b algorithm with a digest size of 512, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. +var HashAlgorithm_Blake2b512 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b512"} - SetContentType(string) +// [BLAKE3](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf) +var HashAlgorithm_Blake3 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake3"} - // GetExternalRefType specifies the type of the external reference. - GetExternalRefType() ExternalRefType +// [Dilithium](https://pq-crystals.org/dilithium/) +var HashAlgorithm_CrystalsDilithium = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/crystalsDilithium"} - SetExternalRefType(ExternalRefType) +// [Kyber](https://pq-crystals.org/kyber/) +var HashAlgorithm_CrystalsKyber = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/crystalsKyber"} - // GetLocator provides the location of an external reference. - GetLocator() []string +// [FALCON](https://falcon-sign.info/falcon.pdf) +var HashAlgorithm_Falcon = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/falcon"} - SetLocator(...string) -} +// MD2 message-digest algorithm, as defined in [RFC 1319](https://datatracker.ietf.org/doc/rfc1319/). +var HashAlgorithm_Md2 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md2"} -type ExternalRef struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ExternalRef" iri-compact:"ExternalRef"` +// MD4 message-digest algorithm, as defined in [RFC 1186](https://datatracker.ietf.org/doc/rfc1186/). +var HashAlgorithm_Md4 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md4"} - Iri string `iri:"@id"` +// MD5 message-digest algorithm, as defined in [RFC 1321](https://datatracker.ietf.org/doc/rfc1321/). +var HashAlgorithm_Md5 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md5"} - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // ContentType specifies the media type of an Element or Property. - ContentType string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/contentType" iri-compact:"contentType"` - // ExternalRefType specifies the type of the external reference. - ExternalRefType ExternalRefType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRefType" iri-compact:"externalRefType"` - // Locator provides the location of an external reference. - Locator []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/locator" iri-compact:"locator"` -} +// [MD6 hash function](https://people.csail.mit.edu/rivest/pubs/RABCx08.pdf) +var HashAlgorithm_Md6 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md6"} -func NewExternalRef() IExternalRef { - return &ExternalRef{} -} +// any hashing algorithm that does not exist in this list of entries +var HashAlgorithm_Other = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/other"} -func (o *ExternalRef) GetComment() string { - return o.Comment -} -func (o *ExternalRef) SetComment(v string) { - o.Comment = v -} -func (o *ExternalRef) GetContentType() string { - return o.ContentType -} -func (o *ExternalRef) SetContentType(v string) { - o.ContentType = v -} -func (o *ExternalRef) GetExternalRefType() ExternalRefType { - return o.ExternalRefType -} -func (o *ExternalRef) SetExternalRefType(v ExternalRefType) { - o.ExternalRefType = v -} -func (o *ExternalRef) GetLocator() []string { - return o.Locator -} -func (o *ExternalRef) SetLocator(v ...string) { - o.Locator = v -} +// SHA-1, a secure hashing algorithm, as defined in [RFC 3174](https://datatracker.ietf.org/doc/rfc3174/). +var HashAlgorithm_Sha1 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha1"} -type ExternalRefType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType" iri-compact:"ExternalRefType"` - - Iri string `iri:"@id"` -} - -var ( - ExternalRefType_AltDownloadLocation = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/altDownloadLocation"} - ExternalRefType_AltWebPage = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/altWebPage"} - ExternalRefType_BinaryArtifact = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/binaryArtifact"} - ExternalRefType_Bower = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/bower"} - ExternalRefType_BuildMeta = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/buildMeta"} - ExternalRefType_BuildSystem = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/buildSystem"} - ExternalRefType_CertificationReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/certificationReport"} - ExternalRefType_Chat = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/chat"} - ExternalRefType_ComponentAnalysisReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/componentAnalysisReport"} - ExternalRefType_Cwe = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/cwe"} - ExternalRefType_Documentation = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/documentation"} - ExternalRefType_DynamicAnalysisReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/dynamicAnalysisReport"} - ExternalRefType_EolNotice = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/eolNotice"} - ExternalRefType_ExportControlAssessment = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/exportControlAssessment"} - ExternalRefType_Funding = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/funding"} - ExternalRefType_IssueTracker = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/issueTracker"} - ExternalRefType_License = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/license"} - ExternalRefType_MailingList = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/mailingList"} - ExternalRefType_MavenCentral = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/mavenCentral"} - ExternalRefType_Metrics = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/metrics"} - ExternalRefType_Npm = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/npm"} - ExternalRefType_Nuget = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/nuget"} - ExternalRefType_Other = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/other"} - ExternalRefType_PrivacyAssessment = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/privacyAssessment"} - ExternalRefType_ProductMetadata = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/productMetadata"} - ExternalRefType_PurchaseOrder = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/purchaseOrder"} - ExternalRefType_QualityAssessmentReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/qualityAssessmentReport"} - ExternalRefType_ReleaseHistory = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/releaseHistory"} - ExternalRefType_ReleaseNotes = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/releaseNotes"} - ExternalRefType_RiskAssessment = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/riskAssessment"} - ExternalRefType_RuntimeAnalysisReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/runtimeAnalysisReport"} - ExternalRefType_SecureSoftwareAttestation = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/secureSoftwareAttestation"} - ExternalRefType_SecurityAdversaryModel = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityAdversaryModel"} - ExternalRefType_SecurityAdvisory = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityAdvisory"} - ExternalRefType_SecurityFix = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityFix"} - ExternalRefType_SecurityOther = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityOther"} - ExternalRefType_SecurityPenTestReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityPenTestReport"} - ExternalRefType_SecurityPolicy = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityPolicy"} - ExternalRefType_SecurityThreatModel = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityThreatModel"} - ExternalRefType_SocialMedia = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/socialMedia"} - ExternalRefType_SourceArtifact = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/sourceArtifact"} - ExternalRefType_StaticAnalysisReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/staticAnalysisReport"} - ExternalRefType_Support = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/support"} - ExternalRefType_Vcs = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vcs"} - ExternalRefType_VulnerabilityDisclosureReport = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vulnerabilityDisclosureReport"} - ExternalRefType_VulnerabilityExploitabilityAssessment = ExternalRefType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vulnerabilityExploitabilityAssessment"} -) +// SHA-2 with a digest length of 224, as defined in [RFC 3874](https://datatracker.ietf.org/doc/rfc3874/). +var HashAlgorithm_Sha224 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha224"} -type HashAlgorithm struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm" iri-compact:"HashAlgorithm"` - - Iri string `iri:"@id"` -} - -var ( - HashAlgorithm_Blake2b256 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b256"} - HashAlgorithm_Blake2b384 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b384"} - HashAlgorithm_Blake2b512 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b512"} - HashAlgorithm_Blake3 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake3"} - HashAlgorithm_CrystalsDilithium = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsDilithium"} - HashAlgorithm_CrystalsKyber = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsKyber"} - HashAlgorithm_Falcon = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/falcon"} - HashAlgorithm_Md2 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md2"} - HashAlgorithm_Md4 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md4"} - HashAlgorithm_Md5 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md5"} - HashAlgorithm_Md6 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md6"} - HashAlgorithm_Other = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/other"} - HashAlgorithm_Sha1 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha1"} - HashAlgorithm_Sha224 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha224"} - HashAlgorithm_Sha256 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha256"} - HashAlgorithm_Sha384 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha384"} - HashAlgorithm_Sha3_224 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_224"} - HashAlgorithm_Sha3_256 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_256"} - HashAlgorithm_Sha3_384 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_384"} - HashAlgorithm_Sha3_512 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_512"} - HashAlgorithm_Sha512 = HashAlgorithm{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha512"} -) +// SHA-2 with a digest length of 256, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). +var HashAlgorithm_Sha256 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha256"} -type IIntegrityMethod interface { +// SHA-2 with a digest length of 384, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). +var HashAlgorithm_Sha384 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha384"} - // GetComment provide consumers with comments by the creator of the Element about the - // Element. - GetComment() string +// SHA-3 with a digest length of 224, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). +var HashAlgorithm_Sha3224 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_224"} - SetComment(string) -} +// SHA-3 with a digest length of 256, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). +var HashAlgorithm_Sha3256 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_256"} -type IntegrityMethod struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/IntegrityMethod" iri-compact:"IntegrityMethod"` +// SHA-3 with a digest length of 384, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). +var HashAlgorithm_Sha3384 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_384"} - Iri string `iri:"@id"` +// SHA-3 with a digest length of 512, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). +var HashAlgorithm_Sha3512 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_512"} - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` -} +// SHA-2 with a digest length of 512, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). +var HashAlgorithm_Sha512 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha512"} -func (o *IntegrityMethod) GetComment() string { - return o.Comment -} -func (o *IntegrityMethod) SetComment(v string) { - o.Comment = v +// A concrete subclass of Element used by Individuals in the +// Core profile. +type IndividualElement struct { + Element } -type LifecycleScopeType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType" iri-compact:"LifecycleScopeType"` +// An Individual Value for Element representing a set of Elements of unknown +// identify or cardinality (number). +var IndividualElement_NoAssertionElement = IndividualElement{Element: Element{ID: "https://spdx.org/rdf/3.0.1/terms/Core/NoAssertionElement"}} - Iri string `iri:"@id"` -} +// An Individual Value for Element representing a set of Elements with +// cardinality (number/count) of zero. +var IndividualElement_NoneElement = IndividualElement{Element: Element{ID: "https://spdx.org/rdf/3.0.1/terms/Core/NoneElement"}} -var ( - LifecycleScopeType_Build = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/build"} - LifecycleScopeType_Design = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/design"} - LifecycleScopeType_Development = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/development"} - LifecycleScopeType_Other = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/other"} - LifecycleScopeType_Runtime = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/runtime"} - LifecycleScopeType_Test = LifecycleScopeType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/test"} -) +func castIndividualElement(o any) *IndividualElement { + if o, ok := o.(AnyIndividualElement); ok { + return o.asIndividualElement() + } + return nil +} -type INamespaceMap interface { +func (o *IndividualElement) asIndividualElement() *IndividualElement { + return o +} - // GetNamespace provides an unambiguous mechanism for conveying a URI fragment portion of an - // ElementID. - GetNamespace() string +type AnyIndividualElement interface { + AnyElement + asIndividualElement() *IndividualElement +} - SetNamespace(string) +type IndividualElementList []AnyIndividualElement - // GetPrefix a substitute for a URI. - GetPrefix() string +func (o *IndividualElementList) Append(values ...AnyIndividualElement) { *o = append(*o, values...) } +func (o *IndividualElementList) Remove(value AnyIndividualElement) { remove(o, value) } - SetPrefix(string) +func (o *IndividualElementList) IndividualElementIter() iter.Seq2[AnyIndividualElement, *IndividualElement] { + return typeIter(*o, castIndividualElement) } -type NamespaceMap struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/NamespaceMap" iri-compact:"NamespaceMap"` +// Provides an independently reproducible mechanism that permits verification of a specific Element. +type IntegrityMethod struct { + ID string - Iri string `iri:"@id"` + // Provide consumers with comments by the creator of the Element about the + // Element. + Comment string +} - // Namespace provides an unambiguous mechanism for conveying a URI fragment portion of an - // ElementID. - Namespace string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/namespace" iri-compact:"namespace"` - // Prefix a substitute for a URI. - Prefix string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/prefix" iri-compact:"prefix"` +func castIntegrityMethod(o any) *IntegrityMethod { + if o, ok := o.(AnyIntegrityMethod); ok { + return o.asIntegrityMethod() + } + return nil } -func NewNamespaceMap() INamespaceMap { - return &NamespaceMap{} +func (o *IntegrityMethod) asIntegrityMethod() *IntegrityMethod { + return o } -func (o *NamespaceMap) GetNamespace() string { - return o.Namespace +type AnyIntegrityMethod interface { + asIntegrityMethod() *IntegrityMethod } -func (o *NamespaceMap) SetNamespace(v string) { - o.Namespace = v + +type IntegrityMethodList []AnyIntegrityMethod + +func (o *IntegrityMethodList) Append(values ...AnyIntegrityMethod) { *o = append(*o, values...) } +func (o *IntegrityMethodList) Remove(value AnyIntegrityMethod) { remove(o, value) } + +func (o *IntegrityMethodList) IntegrityMethodIter() iter.Seq2[AnyIntegrityMethod, *IntegrityMethod] { + return typeIter(*o, castIntegrityMethod) } -func (o *NamespaceMap) GetPrefix() string { - return o.Prefix +func (o *IntegrityMethodList) PackageVerificationCodeIter() iter.Seq2[AnyIntegrityMethod, *PackageVerificationCode] { + return typeIter(*o, castPackageVerificationCode) } -func (o *NamespaceMap) SetPrefix(v string) { - o.Prefix = v +func (o *IntegrityMethodList) SoftwareContentIdentifierIter() iter.Seq2[AnyIntegrityMethod, *SoftwareContentIdentifier] { + return typeIter(*o, castSoftwareContentIdentifier) +} +func (o *IntegrityMethodList) HashIter() iter.Seq2[AnyIntegrityMethod, *Hash] { + return typeIter(*o, castHash) } -type IPackageVerificationCode interface { - IIntegrityMethod - - // GetAlgorithm specifies the algorithm used for calculating the hash value. - GetAlgorithm() HashAlgorithm - - SetAlgorithm(HashAlgorithm) +// Provide an enumerated set of lifecycle phases that can provide context to relationships. +type LifecycleScopeType struct { + ID string +} - // GetHashValue the result of applying a hash algorithm to an Element. - GetHashValue() string +// A relationship has specific context implications during an element's build phase, during development. +var LifecycleScopeType_Build = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/build"} - SetHashValue(string) +// A relationship has specific context implications during an element's design. +var LifecycleScopeType_Design = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/design"} - // GetPackageVerificationCodeExcludedFile the relative file name of a file to be excluded from the - // `PackageVerificationCode`. - GetPackageVerificationCodeExcludedFile() []string +// A relationship has specific context implications during development phase of an element. +var LifecycleScopeType_Development = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/development"} - SetPackageVerificationCodeExcludedFile(...string) -} +// A relationship has other specific context information necessary to capture that the above set of enumerations does not handle. +var LifecycleScopeType_Other = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/other"} -type PackageVerificationCode struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/PackageVerificationCode" iri-compact:"PackageVerificationCode"` +// A relationship has specific context implications during the execution phase of an element. +var LifecycleScopeType_Runtime = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/runtime"} - Iri string `iri:"@id"` +// A relationship has specific context implications during an element's testing phase, during development. +var LifecycleScopeType_Test = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/test"} - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` +// A mapping between prefixes and namespace partial URIs. +type NamespaceMap struct { + ID string - // Algorithm specifies the algorithm used for calculating the hash value. - Algorithm HashAlgorithm `iri:"https://spdx.org/rdf/3.0.0/terms/Core/algorithm" iri-compact:"algorithm"` - // HashValue the result of applying a hash algorithm to an Element. - HashValue string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/hashValue" iri-compact:"hashValue"` - // PackageVerificationCodeExcludedFile the relative file name of a file to be excluded from the - // `PackageVerificationCode`. - PackageVerificationCodeExcludedFile []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/packageVerificationCodeExcludedFile" iri-compact:"packageVerificationCodeExcludedFile"` + // Provides an unambiguous mechanism for conveying a URI fragment portion of an + // Element ID. + Namespace string + // A substitute for a URI. + Prefix string } -func NewPackageVerificationCode() IPackageVerificationCode { - return &PackageVerificationCode{} +func castNamespaceMap(o any) *NamespaceMap { + if o, ok := o.(AnyNamespaceMap); ok { + return o.asNamespaceMap() + } + return nil } -func (o *PackageVerificationCode) GetComment() string { - return o.Comment -} -func (o *PackageVerificationCode) SetComment(v string) { - o.Comment = v +func (o *NamespaceMap) asNamespaceMap() *NamespaceMap { + return o } -func (o *PackageVerificationCode) GetAlgorithm() HashAlgorithm { - return o.Algorithm -} -func (o *PackageVerificationCode) SetAlgorithm(v HashAlgorithm) { - o.Algorithm = v +type AnyNamespaceMap interface { + asNamespaceMap() *NamespaceMap } -func (o *PackageVerificationCode) GetHashValue() string { - return o.HashValue -} -func (o *PackageVerificationCode) SetHashValue(v string) { - o.HashValue = v + +type NamespaceMapList []AnyNamespaceMap + +func (o *NamespaceMapList) Append(values ...AnyNamespaceMap) { *o = append(*o, values...) } +func (o *NamespaceMapList) Remove(value AnyNamespaceMap) { remove(o, value) } + +func (o *NamespaceMapList) NamespaceMapIter() iter.Seq2[AnyNamespaceMap, *NamespaceMap] { + return typeIter(*o, castNamespaceMap) } -func (o *PackageVerificationCode) GetPackageVerificationCodeExcludedFile() []string { - return o.PackageVerificationCodeExcludedFile + +// An SPDX version 2.X compatible verification method for software packages. +type PackageVerificationCode struct { + IntegrityMethod + + // Specifies the algorithm used for calculating the hash value. + Algorithm HashAlgorithm + // The result of applying a hash algorithm to an Element. + HashValue string + // The relative file name of a file to be excluded from the + // `PackageVerificationCode`. + PackageVerificationCodeExcludedFiles []string } -func (o *PackageVerificationCode) SetPackageVerificationCodeExcludedFile(v ...string) { - o.PackageVerificationCodeExcludedFile = v + +func castPackageVerificationCode(o any) *PackageVerificationCode { + if o, ok := o.(AnyPackageVerificationCode); ok { + return o.asPackageVerificationCode() + } + return nil } -type IPositiveIntegerRange interface { +func (o *PackageVerificationCode) asPackageVerificationCode() *PackageVerificationCode { + return o +} - // GetBeginIntegerRange defines the beginning of a range. - GetBeginIntegerRange() uint +type AnyPackageVerificationCode interface { + AnyIntegrityMethod + asPackageVerificationCode() *PackageVerificationCode +} - SetBeginIntegerRange(uint) +type PackageVerificationCodeList []AnyPackageVerificationCode - // GetEndIntegerRange defines the end of a range. - GetEndIntegerRange() uint +func (o *PackageVerificationCodeList) Append(values ...AnyPackageVerificationCode) { + *o = append(*o, values...) +} +func (o *PackageVerificationCodeList) Remove(value AnyPackageVerificationCode) { remove(o, value) } - SetEndIntegerRange(uint) +func (o *PackageVerificationCodeList) PackageVerificationCodeIter() iter.Seq2[AnyPackageVerificationCode, *PackageVerificationCode] { + return typeIter(*o, castPackageVerificationCode) } +// A tuple of two positive integers that define a range. type PositiveIntegerRange struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/PositiveIntegerRange" iri-compact:"PositiveIntegerRange"` + ID string - Iri string `iri:"@id"` - - // BeginIntegerRange defines the beginning of a range. - BeginIntegerRange uint `iri:"https://spdx.org/rdf/3.0.0/terms/Core/beginIntegerRange" iri-compact:"beginIntegerRange"` - // EndIntegerRange defines the end of a range. - EndIntegerRange uint `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endIntegerRange" iri-compact:"endIntegerRange"` + // Defines the beginning of a range. + BeginIntegerRange int + // Defines the end of a range. + EndIntegerRange int } -func NewPositiveIntegerRange() IPositiveIntegerRange { - return &PositiveIntegerRange{} +func castPositiveIntegerRange(o any) *PositiveIntegerRange { + if o, ok := o.(AnyPositiveIntegerRange); ok { + return o.asPositiveIntegerRange() + } + return nil } -func (o *PositiveIntegerRange) GetBeginIntegerRange() uint { - return o.BeginIntegerRange +func (o *PositiveIntegerRange) asPositiveIntegerRange() *PositiveIntegerRange { + return o } -func (o *PositiveIntegerRange) SetBeginIntegerRange(v uint) { - o.BeginIntegerRange = v + +type AnyPositiveIntegerRange interface { + asPositiveIntegerRange() *PositiveIntegerRange } -func (o *PositiveIntegerRange) GetEndIntegerRange() uint { - return o.EndIntegerRange + +type PositiveIntegerRangeList []AnyPositiveIntegerRange + +func (o *PositiveIntegerRangeList) Append(values ...AnyPositiveIntegerRange) { + *o = append(*o, values...) } -func (o *PositiveIntegerRange) SetEndIntegerRange(v uint) { - o.EndIntegerRange = v +func (o *PositiveIntegerRangeList) Remove(value AnyPositiveIntegerRange) { remove(o, value) } + +func (o *PositiveIntegerRangeList) PositiveIntegerRangeIter() iter.Seq2[AnyPositiveIntegerRange, *PositiveIntegerRange] { + return typeIter(*o, castPositiveIntegerRange) } +// Categories of presence or absence. type PresenceType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/PresenceType" iri-compact:"PresenceType"` - - Iri string `iri:"@id"` + ID string } -var ( - PresenceType_No = PresenceType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/no"} - PresenceType_NoAssertion = PresenceType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/noAssertion"} - PresenceType_Yes = PresenceType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/yes"} -) - -type ProfileIdentifierType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType" iri-compact:"ProfileIdentifierType"` - - Iri string `iri:"@id"` -} - -var ( - ProfileIdentifierType_Ai = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/ai"} - ProfileIdentifierType_Build = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/build"} - ProfileIdentifierType_Core = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/core"} - ProfileIdentifierType_Dataset = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/dataset"} - ProfileIdentifierType_ExpandedLicensing = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/expandedLicensing"} - ProfileIdentifierType_Extension = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/extension"} - ProfileIdentifierType_Lite = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/lite"} - ProfileIdentifierType_Security = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/security"} - ProfileIdentifierType_SimpleLicensing = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/simpleLicensing"} - ProfileIdentifierType_Software = ProfileIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/software"} -) +// Indicates absence of the field. +var PresenceType_No = PresenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/no"} -type IRelationship interface { - IElement +// Makes no assertion about the field. +var PresenceType_NoAssertion = PresenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/noAssertion"} - // GetCompleteness provides information about the completeness of relationships. - GetCompleteness() RelationshipCompleteness +// Indicates presence of the field. +var PresenceType_Yes = PresenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/yes"} - SetCompleteness(RelationshipCompleteness) +// Enumeration of the valid profiles. +type ProfileIdentifierType struct { + ID string +} - // GetEndTime specifies the time from which an element is no longer applicable / valid. - GetEndTime() string +// the element follows the AI profile specification +var ProfileIdentifierType_Ai = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/ai"} - SetEndTime(string) +// the element follows the Build profile specification +var ProfileIdentifierType_Build = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/build"} - // GetFrom references the Element on the left-hand side of a relationship. - GetFrom() IElement +// the element follows the Core profile specification +var ProfileIdentifierType_Core = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/core"} - SetFrom(IElement) +// the element follows the Dataset profile specification +var ProfileIdentifierType_Dataset = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/dataset"} - // GetRelationshipType information about the relationship between two Elements. - GetRelationshipType() RelationshipType +// the element follows the ExpandedLicensing profile specification +var ProfileIdentifierType_ExpandedLicensing = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/expandedLicensing"} - SetRelationshipType(RelationshipType) +// the element follows the Extension profile specification +var ProfileIdentifierType_Extension = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/extension"} - // GetStartTime specifies the time from which an element is applicable / valid. - GetStartTime() string +// the element follows the Lite profile specification +var ProfileIdentifierType_Lite = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/lite"} - SetStartTime(string) +// the element follows the Security profile specification +var ProfileIdentifierType_Security = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/security"} - // GetTo references an Element on the right-hand side of a relationship. - GetTo() []IElement +// the element follows the SimpleLicensing profile specification +var ProfileIdentifierType_SimpleLicensing = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/simpleLicensing"} - SetTo(...IElement) -} +// the element follows the Software profile specification +var ProfileIdentifierType_Software = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/software"} +// Describes a relationship between one or more elements. type Relationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Relationship" iri-compact:"Relationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` + Element + + // Provides information about the completeness of relationships. + Completeness RelationshipCompleteness + // Specifies the time from which an element is no longer applicable / valid. + EndTime time.Time + // References the Element on the left-hand side of a relationship. + From AnyElement + + // Information about the relationship between two Elements. + RelationshipType RelationshipType + // Specifies the time from which an element is applicable / valid. + StartTime time.Time + // References an Element on the right-hand side of a relationship. + Tos ElementList +} + +func castRelationship(o any) *Relationship { + if o, ok := o.(AnyRelationship); ok { + return o.asRelationship() + } + return nil } -func NewRelationship() IRelationship { - return &Relationship{} +func (o *Relationship) asRelationship() *Relationship { + return o } -func (o *Relationship) GetSpdxId() string { - return o.SpdxId -} -func (o *Relationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Relationship) GetComment() string { - return o.Comment -} -func (o *Relationship) SetComment(v string) { - o.Comment = v -} -func (o *Relationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Relationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v +type AnyRelationship interface { + AnyElement + asRelationship() *Relationship } -func (o *Relationship) GetDescription() string { - return o.Description + +type RelationshipList []AnyRelationship + +func (o *RelationshipList) Append(values ...AnyRelationship) { *o = append(*o, values...) } +func (o *RelationshipList) Remove(value AnyRelationship) { remove(o, value) } + +func (o *RelationshipList) RelationshipIter() iter.Seq2[AnyRelationship, *Relationship] { + return typeIter(*o, castRelationship) } -func (o *Relationship) SetDescription(v string) { - o.Description = v +func (o *RelationshipList) SecurityVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVulnAssessmentRelationship) } -func (o *Relationship) GetExtensions() []IExtension { - return o.Extensions +func (o *RelationshipList) LifecycleScopedRelationshipIter() iter.Seq2[AnyRelationship, *LifecycleScopedRelationship] { + return typeIter(*o, castLifecycleScopedRelationship) } -func (o *Relationship) SetExtensions(v ...IExtension) { - o.Extensions = v +func (o *RelationshipList) SecurityCvssV2VulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityCvssV2VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV2VulnAssessmentRelationship) } -func (o *Relationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers +func (o *RelationshipList) SecurityCvssV3VulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityCvssV3VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV3VulnAssessmentRelationship) } -func (o *Relationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v +func (o *RelationshipList) SecurityCvssV4VulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityCvssV4VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV4VulnAssessmentRelationship) } -func (o *Relationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs +func (o *RelationshipList) SecurityEpssVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityEpssVulnAssessmentRelationship] { + return typeIter(*o, castSecurityEpssVulnAssessmentRelationship) } -func (o *Relationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v +func (o *RelationshipList) SecurityExploitCatalogVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityExploitCatalogVulnAssessmentRelationship] { + return typeIter(*o, castSecurityExploitCatalogVulnAssessmentRelationship) } -func (o *Relationship) GetName() string { - return o.Name +func (o *RelationshipList) SecuritySsvcVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecuritySsvcVulnAssessmentRelationship] { + return typeIter(*o, castSecuritySsvcVulnAssessmentRelationship) } -func (o *Relationship) SetName(v string) { - o.Name = v +func (o *RelationshipList) SecurityVexVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVexVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexVulnAssessmentRelationship) } -func (o *Relationship) GetSummary() string { - return o.Summary +func (o *RelationshipList) SecurityVexAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVexAffectedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexAffectedVulnAssessmentRelationship) } -func (o *Relationship) SetSummary(v string) { - o.Summary = v +func (o *RelationshipList) SecurityVexFixedVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVexFixedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexFixedVulnAssessmentRelationship) } -func (o *Relationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing +func (o *RelationshipList) SecurityVexNotAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVexNotAffectedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexNotAffectedVulnAssessmentRelationship) } -func (o *Relationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v +func (o *RelationshipList) SecurityVexUnderInvestigationVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVexUnderInvestigationVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexUnderInvestigationVulnAssessmentRelationship) } -func (o *Relationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *Relationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *Relationship) GetEndTime() string { - return o.EndTime -} -func (o *Relationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *Relationship) GetFrom() IElement { - return o.From -} -func (o *Relationship) SetFrom(v IElement) { - o.From = v -} -func (o *Relationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *Relationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *Relationship) GetStartTime() string { - return o.StartTime -} -func (o *Relationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *Relationship) GetTo() []IElement { - return o.To -} -func (o *Relationship) SetTo(v ...IElement) { - o.To = v +// Indicates whether a relationship is known to be complete, incomplete, or if no assertion is made with respect to relationship completeness. +type RelationshipCompleteness struct { + ID string } -type RelationshipCompleteness struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness" iri-compact:"RelationshipCompleteness"` +// The relationship is known to be exhaustive. +var RelationshipCompleteness_Complete = RelationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/complete"} - Iri string `iri:"@id"` -} +// The relationship is known not to be exhaustive. +var RelationshipCompleteness_Incomplete = RelationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/incomplete"} -var ( - RelationshipCompleteness_Complete = RelationshipCompleteness{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/complete"} - RelationshipCompleteness_Incomplete = RelationshipCompleteness{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/incomplete"} - RelationshipCompleteness_NoAssertion = RelationshipCompleteness{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/noAssertion"} -) +// No assertion can be made about the completeness of the relationship. +var RelationshipCompleteness_NoAssertion = RelationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/noAssertion"} +// Information about the relationship between two Elements. type RelationshipType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType" iri-compact:"RelationshipType"` - - Iri string `iri:"@id"` -} - -var ( - RelationshipType_Affects = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/affects"} - RelationshipType_AmendedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/amendedBy"} - RelationshipType_AncestorOf = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/ancestorOf"} - RelationshipType_AvailableFrom = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/availableFrom"} - RelationshipType_Configures = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/configures"} - RelationshipType_Contains = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/contains"} - RelationshipType_CoordinatedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/coordinatedBy"} - RelationshipType_CopiedTo = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/copiedTo"} - RelationshipType_DelegatedTo = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/delegatedTo"} - RelationshipType_DependsOn = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/dependsOn"} - RelationshipType_DescendantOf = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/descendantOf"} - RelationshipType_Describes = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/describes"} - RelationshipType_DoesNotAffect = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/doesNotAffect"} - RelationshipType_ExpandsTo = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/expandsTo"} - RelationshipType_ExploitCreatedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/exploitCreatedBy"} - RelationshipType_FixedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/fixedBy"} - RelationshipType_FixedIn = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/fixedIn"} - RelationshipType_FoundBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/foundBy"} - RelationshipType_Generates = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/generates"} - RelationshipType_HasAddedFile = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAddedFile"} - RelationshipType_HasAssessmentFor = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAssessmentFor"} - RelationshipType_HasAssociatedVulnerability = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAssociatedVulnerability"} - RelationshipType_HasConcludedLicense = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasConcludedLicense"} - RelationshipType_HasDataFile = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDataFile"} - RelationshipType_HasDeclaredLicense = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDeclaredLicense"} - RelationshipType_HasDeletedFile = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDeletedFile"} - RelationshipType_HasDependencyManifest = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDependencyManifest"} - RelationshipType_HasDistributionArtifact = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDistributionArtifact"} - RelationshipType_HasDocumentation = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDocumentation"} - RelationshipType_HasDynamicLink = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDynamicLink"} - RelationshipType_HasEvidence = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasEvidence"} - RelationshipType_HasExample = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasExample"} - RelationshipType_HasHost = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasHost"} - RelationshipType_HasInputs = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasInputs"} - RelationshipType_HasMetadata = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasMetadata"} - RelationshipType_HasOptionalComponent = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOptionalComponent"} - RelationshipType_HasOptionalDependency = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOptionalDependency"} - RelationshipType_HasOutputs = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOutputs"} - RelationshipType_HasPrerequsite = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasPrerequsite"} - RelationshipType_HasProvidedDependency = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasProvidedDependency"} - RelationshipType_HasRequirement = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasRequirement"} - RelationshipType_HasSpecification = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasSpecification"} - RelationshipType_HasStaticLink = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasStaticLink"} - RelationshipType_HasTest = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasTest"} - RelationshipType_HasTestCase = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasTestCase"} - RelationshipType_HasVariant = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasVariant"} - RelationshipType_InvokedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/invokedBy"} - RelationshipType_ModifiedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/modifiedBy"} - RelationshipType_Other = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/other"} - RelationshipType_PackagedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/packagedBy"} - RelationshipType_PatchedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/patchedBy"} - RelationshipType_PublishedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/publishedBy"} - RelationshipType_ReportedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/reportedBy"} - RelationshipType_RepublishedBy = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/republishedBy"} - RelationshipType_SerializedInArtifact = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/serializedInArtifact"} - RelationshipType_TestedOn = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/testedOn"} - RelationshipType_TrainedOn = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/trainedOn"} - RelationshipType_UnderInvestigationFor = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/underInvestigationFor"} - RelationshipType_UsesTool = RelationshipType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/usesTool"} -) + ID string +} -type ISpdxDocument interface { - IElementCollection +// The `from` Vulnerability affects each `to` Element. The use of the `affects` type is constrained to `VexAffectedVulnAssessmentRelationship` classed relationships. +var RelationshipType_Affects = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/affects"} - // GetDataLicense provides the license under which the SPDX documentation of the Element can be - // used. - GetDataLicense() IAnyLicenseInfo +// The `from` Element is amended by each `to` Element. +var RelationshipType_AmendedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/amendedBy"} - SetDataLicense(IAnyLicenseInfo) +// The `from` Element is an ancestor of each `to` Element. +var RelationshipType_AncestorOf = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/ancestorOf"} - // GetImports provides an ExternalMap of Element identifiers. - GetImports() []IExternalMap +// The `from` Element is available from the additional supplier described by each `to` Element. +var RelationshipType_AvailableFrom = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/availableFrom"} - SetImports(...IExternalMap) +// The `from` Element is a configuration applied to each `to` Element, during a LifecycleScopeType period. +var RelationshipType_Configures = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/configures"} - // GetNamespaceMap provides a NamespaceMap of prefixes and associated namespace partial URIs applicable to an SpdxDocument and independent of any specific serialization format or instance. - GetNamespaceMap() []INamespaceMap +// The `from` Element contains each `to` Element. +var RelationshipType_Contains = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/contains"} - SetNamespaceMap(...INamespaceMap) -} +// The `from` Vulnerability is coordinatedBy the `to` Agent(s) (vendor, researcher, or consumer agent). +var RelationshipType_CoordinatedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/coordinatedBy"} -type SpdxDocument struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/SpdxDocument" iri-compact:"SpdxDocument" id-prop:"spdxId"` +// The `from` Element has been copied to each `to` Element. +var RelationshipType_CopiedTo = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/copiedTo"} - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +// The `from` Agent is delegating an action to the Agent of the `to` Relationship (which must be of type invokedBy), during a LifecycleScopeType (e.g. the `to` invokedBy Relationship is being done on behalf of `from`). +var RelationshipType_DelegatedTo = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/delegatedTo"} - // Elements refers to one or more Elements that are part of an ElementCollection. - Elements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/element" iri-compact:"element"` - // ProfileConformance describes one a profile which the creator of this ElementCollection intends to - // conform to. - ProfileConformance []ProfileIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/profileConformance" iri-compact:"profileConformance"` - // RootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. - RootElements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/rootElement" iri-compact:"rootElement"` +// The `from` Element depends on each `to` Element, during a LifecycleScopeType period. +var RelationshipType_DependsOn = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/dependsOn"} - // DataLicense provides the license under which the SPDX documentation of the Element can be - // used. - DataLicense IAnyLicenseInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/dataLicense" iri-compact:"dataLicense"` - // Imports provides an ExternalMap of Element identifiers. - Imports []IExternalMap `iri:"https://spdx.org/rdf/3.0.0/terms/Core/imports" iri-compact:"imports"` - // NamespaceMap provides a NamespaceMap of prefixes and associated namespace partial URIs applicable to an SpdxDocument and independent of any specific serialization format or instance. - NamespaceMap []INamespaceMap `iri:"https://spdx.org/rdf/3.0.0/terms/Core/namespaceMap" iri-compact:"namespaceMap"` -} +// The `from` Element is a descendant of each `to` Element. +var RelationshipType_DescendantOf = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/descendantOf"} -func NewSpdxDocument() ISpdxDocument { - return &SpdxDocument{} -} +// The `from` Element describes each `to` Element. To denote the root(s) of a tree of elements in a collection, the rootElement property should be used. +var RelationshipType_Describes = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/describes"} -func (o *SpdxDocument) GetSpdxId() string { - return o.SpdxId -} -func (o *SpdxDocument) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *SpdxDocument) GetComment() string { - return o.Comment -} -func (o *SpdxDocument) SetComment(v string) { - o.Comment = v -} -func (o *SpdxDocument) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *SpdxDocument) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *SpdxDocument) GetDescription() string { - return o.Description -} -func (o *SpdxDocument) SetDescription(v string) { - o.Description = v -} -func (o *SpdxDocument) GetExtensions() []IExtension { - return o.Extensions -} -func (o *SpdxDocument) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *SpdxDocument) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *SpdxDocument) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *SpdxDocument) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *SpdxDocument) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *SpdxDocument) GetName() string { - return o.Name -} -func (o *SpdxDocument) SetName(v string) { - o.Name = v -} -func (o *SpdxDocument) GetSummary() string { - return o.Summary -} -func (o *SpdxDocument) SetSummary(v string) { - o.Summary = v -} -func (o *SpdxDocument) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *SpdxDocument) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} +// The `from` Vulnerability has no impact on each `to` Element. The use of the `doesNotAffect` is constrained to `VexNotAffectedVulnAssessmentRelationship` classed relationships. +var RelationshipType_DoesNotAffect = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/doesNotAffect"} -func (o *SpdxDocument) GetElements() []IElement { - return o.Elements -} -func (o *SpdxDocument) SetElements(v ...IElement) { - o.Elements = v -} -func (o *SpdxDocument) GetProfileConformance() []ProfileIdentifierType { - return o.ProfileConformance -} -func (o *SpdxDocument) SetProfileConformance(v ...ProfileIdentifierType) { - o.ProfileConformance = v -} -func (o *SpdxDocument) GetRootElements() []IElement { - return o.RootElements -} -func (o *SpdxDocument) SetRootElements(v ...IElement) { - o.RootElements = v -} +// The `from` archive expands out as an artifact described by each `to` Element. +var RelationshipType_ExpandsTo = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/expandsTo"} -func (o *SpdxDocument) GetDataLicense() IAnyLicenseInfo { - return o.DataLicense -} -func (o *SpdxDocument) SetDataLicense(v IAnyLicenseInfo) { - o.DataLicense = v -} -func (o *SpdxDocument) GetImports() []IExternalMap { - return o.Imports -} -func (o *SpdxDocument) SetImports(v ...IExternalMap) { - o.Imports = v -} -func (o *SpdxDocument) GetNamespaceMap() []INamespaceMap { - return o.NamespaceMap -} -func (o *SpdxDocument) SetNamespaceMap(v ...INamespaceMap) { - o.NamespaceMap = v -} +// The `from` Vulnerability has had an exploit created against it by each `to` Agent. +var RelationshipType_ExploitCreatedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/exploitCreatedBy"} -type SupportType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/SupportType" iri-compact:"SupportType"` +// Designates a `from` Vulnerability has been fixed by the `to` Agent(s). +var RelationshipType_FixedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/fixedBy"} - Iri string `iri:"@id"` -} +// A `from` Vulnerability has been fixed in each `to` Element. The use of the `fixedIn` type is constrained to `VexFixedVulnAssessmentRelationship` classed relationships. +var RelationshipType_FixedIn = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/fixedIn"} -var ( - SupportType_Deployed = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/deployed"} - SupportType_Development = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/development"} - SupportType_EndOfSupport = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/endOfSupport"} - SupportType_LimitedSupport = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/limitedSupport"} - SupportType_NoAssertion = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/noAssertion"} - SupportType_NoSupport = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/noSupport"} - SupportType_Support = SupportType{Iri: "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/support"} -) +// Designates a `from` Vulnerability was originally discovered by the `to` Agent(s). +var RelationshipType_FoundBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/foundBy"} -type ITool interface { - IElement -} +// The `from` Element generates each `to` Element. +var RelationshipType_Generates = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/generates"} -type Tool struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Tool" iri-compact:"Tool" id-prop:"spdxId"` +// Every `to` Element is a file added to the `from` Element (`from` hasAddedFile `to`). +var RelationshipType_HasAddedFile = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAddedFile"} - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` -} +// Relates a `from` Vulnerability and each `to` Element with a security assessment. To be used with `VulnAssessmentRelationship` types. +var RelationshipType_HasAssessmentFor = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAssessmentFor"} -func NewTool() ITool { - return &Tool{} -} +// Used to associate a `from` Artifact with each `to` Vulnerability. +var RelationshipType_HasAssociatedVulnerability = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAssociatedVulnerability"} -func (o *Tool) GetSpdxId() string { - return o.SpdxId -} -func (o *Tool) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Tool) GetComment() string { - return o.Comment -} -func (o *Tool) SetComment(v string) { - o.Comment = v -} -func (o *Tool) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Tool) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *Tool) GetDescription() string { - return o.Description -} -func (o *Tool) SetDescription(v string) { - o.Description = v -} -func (o *Tool) GetExtensions() []IExtension { - return o.Extensions -} -func (o *Tool) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *Tool) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers +// The `from` SoftwareArtifact is concluded by the SPDX data creator to be governed by each `to` license. +var RelationshipType_HasConcludedLicense = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasConcludedLicense"} + +// The `from` Element treats each `to` Element as a data file. A data file is an artifact that stores data required or optional for the `from` Element's functionality. A data file can be a database file, an index file, a log file, an AI model file, a calibration data file, a temporary file, a backup file, and more. For AI training dataset, test dataset, test artifact, configuration data, build input data, and build output data, please consider using the more specific relationship types: `trainedOn`, `testedOn`, `hasTest`, `configures`, `hasInput`, and `hasOutput`, respectively. This relationship does not imply dependency. +var RelationshipType_HasDataFile = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDataFile"} + +// The `from` SoftwareArtifact was discovered to actually contain each `to` license, for example as detected by use of automated tooling. +var RelationshipType_HasDeclaredLicense = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDeclaredLicense"} + +// Every `to` Element is a file deleted from the `from` Element (`from` hasDeletedFile `to`). +var RelationshipType_HasDeletedFile = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDeletedFile"} + +// The `from` Element has manifest files that contain dependency information in each `to` Element. +var RelationshipType_HasDependencyManifest = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDependencyManifest"} + +// The `from` Element is distributed as an artifact in each `to` Element (e.g. an RPM or archive file). +var RelationshipType_HasDistributionArtifact = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDistributionArtifact"} + +// The `from` Element is documented by each `to` Element. +var RelationshipType_HasDocumentation = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDocumentation"} + +// The `from` Element dynamically links in each `to` Element, during a LifecycleScopeType period. +var RelationshipType_HasDynamicLink = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDynamicLink"} + +// Every `to` Element is considered as evidence for the `from` Element (`from` hasEvidence `to`). +var RelationshipType_HasEvidence = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasEvidence"} + +// Every `to` Element is an example for the `from` Element (`from` hasExample `to`). +var RelationshipType_HasExample = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasExample"} + +// The `from` Build was run on the `to` Element during a LifecycleScopeType period (e.g. the host that the build runs on). +var RelationshipType_HasHost = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasHost"} + +// The `from` Build has each `to` Element as an input, during a LifecycleScopeType period. +var RelationshipType_HasInput = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasInput"} + +// Every `to` Element is metadata about the `from` Element (`from` hasMetadata `to`). +var RelationshipType_HasMetadata = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasMetadata"} + +// Every `to` Element is an optional component of the `from` Element (`from` hasOptionalComponent `to`). +var RelationshipType_HasOptionalComponent = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOptionalComponent"} + +// The `from` Element optionally depends on each `to` Element, during a LifecycleScopeType period. +var RelationshipType_HasOptionalDependency = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOptionalDependency"} + +// The `from` Build element generates each `to` Element as an output, during a LifecycleScopeType period. +var RelationshipType_HasOutput = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOutput"} + +// The `from` Element has a prerequisite on each `to` Element, during a LifecycleScopeType period. +var RelationshipType_HasPrerequisite = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasPrerequisite"} + +// The `from` Element has a dependency on each `to` Element, dependency is not in the distributed artifact, but assumed to be provided, during a LifecycleScopeType period. +var RelationshipType_HasProvidedDependency = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasProvidedDependency"} + +// The `from` Element has a requirement on each `to` Element, during a LifecycleScopeType period. +var RelationshipType_HasRequirement = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasRequirement"} + +// Every `to` Element is a specification for the `from` Element (`from` hasSpecification `to`), during a LifecycleScopeType period. +var RelationshipType_HasSpecification = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasSpecification"} + +// The `from` Element statically links in each `to` Element, during a LifecycleScopeType period. +var RelationshipType_HasStaticLink = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasStaticLink"} + +// Every `to` Element is a test artifact for the `from` Element (`from` hasTest `to`), during a LifecycleScopeType period. +var RelationshipType_HasTest = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasTest"} + +// Every `to` Element is a test case for the `from` Element (`from` hasTestCase `to`). +var RelationshipType_HasTestCase = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasTestCase"} + +// Every `to` Element is a variant the `from` Element (`from` hasVariant `to`). +var RelationshipType_HasVariant = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasVariant"} + +// The `from` Element was invoked by the `to` Agent, during a LifecycleScopeType period (for example, a Build element that describes a build step). +var RelationshipType_InvokedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/invokedBy"} + +// The `from` Element is modified by each `to` Element. +var RelationshipType_ModifiedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/modifiedBy"} + +// Every `to` Element is related to the `from` Element where the relationship type is not described by any of the SPDX relationship types (this relationship is directionless). +var RelationshipType_Other = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/other"} + +// Every `to` Element is a packaged instance of the `from` Element (`from` packagedBy `to`). +var RelationshipType_PackagedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/packagedBy"} + +// Every `to` Element is a patch for the `from` Element (`from` patchedBy `to`). +var RelationshipType_PatchedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/patchedBy"} + +// Designates a `from` Vulnerability was made available for public use or reference by each `to` Agent. +var RelationshipType_PublishedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/publishedBy"} + +// Designates a `from` Vulnerability was first reported to a project, vendor, or tracking database for formal identification by each `to` Agent. +var RelationshipType_ReportedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/reportedBy"} + +// Designates a `from` Vulnerability's details were tracked, aggregated, and/or enriched to improve context (i.e. NVD) by each `to` Agent. +var RelationshipType_RepublishedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/republishedBy"} + +// The `from` SpdxDocument can be found in a serialized form in each `to` Artifact. +var RelationshipType_SerializedInArtifact = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/serializedInArtifact"} + +// The `from` Element has been tested on the `to` Element(s). +var RelationshipType_TestedOn = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/testedOn"} + +// The `from` Element has been trained on the `to` Element(s). +var RelationshipType_TrainedOn = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/trainedOn"} + +// The `from` Vulnerability impact is being investigated for each `to` Element. The use of the `underInvestigationFor` type is constrained to `VexUnderInvestigationVulnAssessmentRelationship` classed relationships. +var RelationshipType_UnderInvestigationFor = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/underInvestigationFor"} + +// The `from` Element uses each `to` Element as a tool, during a LifecycleScopeType period. +var RelationshipType_UsesTool = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/usesTool"} + +// A collection of SPDX Elements that could potentially be serialized. +type SpdxDocument struct { + ElementCollection + + // Provides the license under which the SPDX documentation of the Element can be + // used. + DataLicense AnySimplelicensingAnyLicenseInfo + + // Provides an ExternalMap of Element identifiers. + Imports ExternalMapList + + // Provides a NamespaceMap of prefixes and associated namespace partial URIs applicable to an SpdxDocument and independent of any specific serialization format or instance. + NamespaceMaps NamespaceMapList } -func (o *Tool) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v + +func castSpdxDocument(o any) *SpdxDocument { + if o, ok := o.(AnySpdxDocument); ok { + return o.asSpdxDocument() + } + return nil } -func (o *Tool) GetExternalRefs() []IExternalRef { - return o.ExternalRefs + +func (o *SpdxDocument) asSpdxDocument() *SpdxDocument { + return o } -func (o *Tool) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v + +type AnySpdxDocument interface { + AnyElementCollection + asSpdxDocument() *SpdxDocument } -func (o *Tool) GetName() string { - return o.Name + +type SpdxDocumentList []AnySpdxDocument + +func (o *SpdxDocumentList) Append(values ...AnySpdxDocument) { *o = append(*o, values...) } +func (o *SpdxDocumentList) Remove(value AnySpdxDocument) { remove(o, value) } + +func (o *SpdxDocumentList) SpdxDocumentIter() iter.Seq2[AnySpdxDocument, *SpdxDocument] { + return typeIter(*o, castSpdxDocument) } -func (o *Tool) SetName(v string) { - o.Name = v + +// Indicates the type of support that is associated with an artifact. +type SupportType struct { + ID string } -func (o *Tool) GetSummary() string { - return o.Summary + +// in addition to being supported by the supplier, the software is known to have been deployed and is in use. For a software as a service provider, this implies the software is now available as a service. +var SupportType_Deployed = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/deployed"} + +// the artifact is in active development and is not considered ready for formal support from the supplier. +var SupportType_Development = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/development"} + +// there is a defined end of support for the artifact from the supplier. This may also be referred to as end of life. There is a validUntilDate that can be used to signal when support ends for the artifact. +var SupportType_EndOfSupport = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/endOfSupport"} + +// the artifact has been released, and there is limited support available from the supplier. There is a validUntilDate that can provide additional information about the duration of support. +var SupportType_LimitedSupport = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/limitedSupport"} + +// no assertion about the type of support is made. This is considered the default if no other support type is used. +var SupportType_NoAssertion = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/noAssertion"} + +// there is no support for the artifact from the supplier, consumer assumes any support obligations. +var SupportType_NoSupport = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/noSupport"} + +// the artifact has been released, and is supported from the supplier. There is a validUntilDate that can provide additional information about the duration of support. +var SupportType_Support = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/support"} + +// An element of hardware and/or software utilized to carry out a particular function. +type Tool struct { + Element } -func (o *Tool) SetSummary(v string) { - o.Summary = v + +func castTool(o any) *Tool { + if o, ok := o.(AnyTool); ok { + return o.asTool() + } + return nil } -func (o *Tool) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing + +func (o *Tool) asTool() *Tool { + return o } -func (o *Tool) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v + +type AnyTool interface { + AnyElement + asTool() *Tool } -type ConfidentialityLevelType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType" iri-compact:"dataset_ConfidentialityLevelType"` +type ToolList []AnyTool + +func (o *ToolList) Append(values ...AnyTool) { *o = append(*o, values...) } +func (o *ToolList) Remove(value AnyTool) { remove(o, value) } + +func (o *ToolList) ToolIter() iter.Seq2[AnyTool, *Tool] { return typeIter(*o, castTool) } - Iri string `iri:"@id"` +// Categories of confidentiality level. +type DatasetConfidentialityLevelType struct { + ID string } -var ( - ConfidentialityLevelType_Amber = ConfidentialityLevelType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/amber"} - ConfidentialityLevelType_Clear = ConfidentialityLevelType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/clear"} - ConfidentialityLevelType_Green = ConfidentialityLevelType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/green"} - ConfidentialityLevelType_Red = ConfidentialityLevelType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/red"} -) +// Data points in the dataset can be shared only with specific organizations and their clients on a need to know basis. +var DatasetConfidentialityLevelType_Amber = DatasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/amber"} + +// Dataset may be distributed freely, without restriction. +var DatasetConfidentialityLevelType_Clear = DatasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/clear"} -type DatasetAvailabilityType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType" iri-compact:"dataset_DatasetAvailabilityType"` +// Dataset can be shared within a community of peers and partners. +var DatasetConfidentialityLevelType_Green = DatasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/green"} - Iri string `iri:"@id"` +// Data points in the dataset are highly confidential and can only be shared with named recipients. +var DatasetConfidentialityLevelType_Red = DatasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/red"} + +// Availability of dataset. +type DatasetDatasetAvailabilityType struct { + ID string } -var ( - DatasetAvailabilityType_Clickthrough = DatasetAvailabilityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/clickthrough"} - DatasetAvailabilityType_DirectDownload = DatasetAvailabilityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/directDownload"} - DatasetAvailabilityType_Query = DatasetAvailabilityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/query"} - DatasetAvailabilityType_Registration = DatasetAvailabilityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/registration"} - DatasetAvailabilityType_ScrapingScript = DatasetAvailabilityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/scrapingScript"} -) +// the dataset is not publicly available and can only be accessed after affirmatively accepting terms on a clickthrough webpage. +var DatasetDatasetAvailabilityType_Clickthrough = DatasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/clickthrough"} -type DatasetType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType" iri-compact:"dataset_DatasetType"` - - Iri string `iri:"@id"` -} - -var ( - DatasetType_Audio = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/audio"} - DatasetType_Categorical = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/categorical"} - DatasetType_Graph = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/graph"} - DatasetType_Image = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/image"} - DatasetType_NoAssertion = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/noAssertion"} - DatasetType_Numeric = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/numeric"} - DatasetType_Other = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/other"} - DatasetType_Sensor = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/sensor"} - DatasetType_Structured = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/structured"} - DatasetType_Syntactic = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/syntactic"} - DatasetType_Text = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/text"} - DatasetType_Timeseries = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/timeseries"} - DatasetType_Timestamp = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/timestamp"} - DatasetType_Video = DatasetType{Iri: "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/video"} -) +// the dataset is publicly available and can be downloaded directly. +var DatasetDatasetAvailabilityType_DirectDownload = DatasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/directDownload"} -type ILicenseAddition interface { - IElement +// the dataset is publicly available, but not all at once, and can only be accessed through queries which return parts of the dataset. +var DatasetDatasetAvailabilityType_Query = DatasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/query"} - // GetAdditionText identifies the full text of a LicenseAddition. - GetAdditionText() string +// the dataset is not publicly available and an email registration is required before accessing the dataset, although without an affirmative acceptance of terms. +var DatasetDatasetAvailabilityType_Registration = DatasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/registration"} - SetAdditionText(string) +// the dataset provider is not making available the underlying data and the dataset must be reassembled, typically using the provided script for scraping the data. +var DatasetDatasetAvailabilityType_ScrapingScript = DatasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/scrapingScript"} - // GetIsDeprecatedAdditionId specifies whether an additional text identifier has been marked as deprecated. - GetIsDeprecatedAdditionId() bool +// Enumeration of dataset types. +type DatasetDatasetType struct { + ID string +} - SetIsDeprecatedAdditionId(bool) +// data is audio based, such as a collection of music from the 80s. +var DatasetDatasetType_Audio = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/audio"} - // GetLicenseXml identifies all the text and metadata associated with a license in the license - // XML format. - GetLicenseXml() string +// data that is classified into a discrete number of categories, such as the eye color of a population of people. +var DatasetDatasetType_Categorical = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/categorical"} - SetLicenseXml(string) +// data is in the form of a graph where entries are somehow related to each other through edges, such a social network of friends. +var DatasetDatasetType_Graph = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/graph"} - // GetObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated - // License or LicenseAddition. - GetObsoletedBy() string +// data is a collection of images such as pictures of animals. +var DatasetDatasetType_Image = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/image"} - SetObsoletedBy(string) +// data type is not known. +var DatasetDatasetType_NoAssertion = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/noAssertion"} - // GetSeeAlso contains a URL where the License or LicenseAddition can be found in use. - GetSeeAlso() []string +// data consists only of numeric entries. +var DatasetDatasetType_Numeric = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/numeric"} - SetSeeAlso(...string) +// data is of a type not included in this list. +var DatasetDatasetType_Other = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/other"} - // GetStandardAdditionTemplate identifies the full text of a LicenseAddition, in SPDX templating format. - GetStandardAdditionTemplate() string +// data is recorded from a physical sensor, such as a thermometer reading or biometric device. +var DatasetDatasetType_Sensor = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/sensor"} - SetStandardAdditionTemplate(string) -} +// data is stored in tabular format or retrieved from a relational database. +var DatasetDatasetType_Structured = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/structured"} -type LicenseAddition struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/LicenseAddition" iri-compact:"expandedlicensing_LicenseAddition" id-prop:"spdxId"` +// data describes the syntax or semantics of a language or text, such as a parse tree used for natural language processing. +var DatasetDatasetType_Syntactic = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/syntactic"} - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +// data consists of unstructured text, such as a book, Wikipedia article (without images), or transcript. +var DatasetDatasetType_Text = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/text"} + +// data is recorded in an ordered sequence of timestamped entries, such as the price of a stock over the course of a day. +var DatasetDatasetType_Timeseries = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/timeseries"} + +// data is recorded with a timestamp for each entry, but not necessarily ordered or at specific intervals, such as when a taxi ride starts and ends. +var DatasetDatasetType_Timestamp = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/timestamp"} + +// data is video based, such as a collection of movie clips featuring Tom Hanks. +var DatasetDatasetType_Video = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/video"} - // AdditionText identifies the full text of a LicenseAddition. - AdditionText string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/additionText" iri-compact:"expandedlicensing_additionText"` - // IsDeprecatedAdditionId specifies whether an additional text identifier has been marked as deprecated. - IsDeprecatedAdditionId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedAdditionId" iri-compact:"expandedlicensing_isDeprecatedAdditionId"` - // LicenseXml identifies all the text and metadata associated with a license in the license +// Abstract class for additional text intended to be added to a License, but +// which is not itself a standalone License. +type ExpandedlicensingLicenseAddition struct { + Element + + // Identifies the full text of a LicenseAddition. + ExpandedlicensingAdditionText string + // Specifies whether an additional text identifier has been marked as deprecated. + ExpandedlicensingIsDeprecatedAdditionId bool + // Identifies all the text and metadata associated with a license in the license // XML format. - LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` - // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated + ExpandedlicensingLicenseXml string + // Specifies the licenseId that is preferred to be used in place of a deprecated // License or LicenseAddition. - ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` - // SeeAlso contains a URL where the License or LicenseAddition can be found in use. - SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` - // StandardAdditionTemplate identifies the full text of a LicenseAddition, in SPDX templating format. - StandardAdditionTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardAdditionTemplate" iri-compact:"expandedlicensing_standardAdditionTemplate"` + ExpandedlicensingObsoletedBy string + // Contains a URL where the License or LicenseAddition can be found in use. + ExpandedlicensingSeeAlsos []string + // Identifies the full text of a LicenseAddition, in SPDX templating format. + ExpandedlicensingStandardAdditionTemplate string } -func (o *LicenseAddition) GetSpdxId() string { - return o.SpdxId -} -func (o *LicenseAddition) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *LicenseAddition) GetComment() string { - return o.Comment +func castExpandedlicensingLicenseAddition(o any) *ExpandedlicensingLicenseAddition { + if o, ok := o.(AnyExpandedlicensingLicenseAddition); ok { + return o.asExpandedlicensingLicenseAddition() + } + return nil } -func (o *LicenseAddition) SetComment(v string) { - o.Comment = v + +func (o *ExpandedlicensingLicenseAddition) asExpandedlicensingLicenseAddition() *ExpandedlicensingLicenseAddition { + return o } -func (o *LicenseAddition) GetCreationInfo() ICreationInfo { - return o.CreationInfo + +type AnyExpandedlicensingLicenseAddition interface { + AnyElement + asExpandedlicensingLicenseAddition() *ExpandedlicensingLicenseAddition } -func (o *LicenseAddition) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v + +type ExpandedlicensingLicenseAdditionList []AnyExpandedlicensingLicenseAddition + +func (o *ExpandedlicensingLicenseAdditionList) Append(values ...AnyExpandedlicensingLicenseAddition) { + *o = append(*o, values...) } -func (o *LicenseAddition) GetDescription() string { - return o.Description +func (o *ExpandedlicensingLicenseAdditionList) Remove(value AnyExpandedlicensingLicenseAddition) { + remove(o, value) } -func (o *LicenseAddition) SetDescription(v string) { - o.Description = v + +func (o *ExpandedlicensingLicenseAdditionList) ExpandedlicensingLicenseAdditionIter() iter.Seq2[AnyExpandedlicensingLicenseAddition, *ExpandedlicensingLicenseAddition] { + return typeIter(*o, castExpandedlicensingLicenseAddition) } -func (o *LicenseAddition) GetExtensions() []IExtension { - return o.Extensions +func (o *ExpandedlicensingLicenseAdditionList) ExpandedlicensingListedLicenseExceptionIter() iter.Seq2[AnyExpandedlicensingLicenseAddition, *ExpandedlicensingListedLicenseException] { + return typeIter(*o, castExpandedlicensingListedLicenseException) } -func (o *LicenseAddition) SetExtensions(v ...IExtension) { - o.Extensions = v +func (o *ExpandedlicensingLicenseAdditionList) ExpandedlicensingCustomLicenseAdditionIter() iter.Seq2[AnyExpandedlicensingLicenseAddition, *ExpandedlicensingCustomLicenseAddition] { + return typeIter(*o, castExpandedlicensingCustomLicenseAddition) } -func (o *LicenseAddition) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers + +// A license exception that is listed on the SPDX Exceptions list. +type ExpandedlicensingListedLicenseException struct { + ExpandedlicensingLicenseAddition + + // Specifies the SPDX License List version in which this license or exception + // identifier was deprecated. + ExpandedlicensingDeprecatedVersion string + // Specifies the SPDX License List version in which this ListedLicense or + // ListedLicenseException identifier was first added. + ExpandedlicensingListVersionAdded string } -func (o *LicenseAddition) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v + +func castExpandedlicensingListedLicenseException(o any) *ExpandedlicensingListedLicenseException { + if o, ok := o.(AnyExpandedlicensingListedLicenseException); ok { + return o.asExpandedlicensingListedLicenseException() + } + return nil } -func (o *LicenseAddition) GetExternalRefs() []IExternalRef { - return o.ExternalRefs + +func (o *ExpandedlicensingListedLicenseException) asExpandedlicensingListedLicenseException() *ExpandedlicensingListedLicenseException { + return o } -func (o *LicenseAddition) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v + +type AnyExpandedlicensingListedLicenseException interface { + AnyExpandedlicensingLicenseAddition + asExpandedlicensingListedLicenseException() *ExpandedlicensingListedLicenseException } -func (o *LicenseAddition) GetName() string { - return o.Name + +type ExpandedlicensingListedLicenseExceptionList []AnyExpandedlicensingListedLicenseException + +func (o *ExpandedlicensingListedLicenseExceptionList) Append(values ...AnyExpandedlicensingListedLicenseException) { + *o = append(*o, values...) } -func (o *LicenseAddition) SetName(v string) { - o.Name = v +func (o *ExpandedlicensingListedLicenseExceptionList) Remove(value AnyExpandedlicensingListedLicenseException) { + remove(o, value) } -func (o *LicenseAddition) GetSummary() string { - return o.Summary + +func (o *ExpandedlicensingListedLicenseExceptionList) ExpandedlicensingListedLicenseExceptionIter() iter.Seq2[AnyExpandedlicensingListedLicenseException, *ExpandedlicensingListedLicenseException] { + return typeIter(*o, castExpandedlicensingListedLicenseException) } -func (o *LicenseAddition) SetSummary(v string) { - o.Summary = v + +// A property name with an associated value. +type ExtensionCdxPropertyEntry struct { + ID string + + // A name used in a CdxPropertyEntry name-value pair. + ExtensionCdxPropName string + // A value used in a CdxPropertyEntry name-value pair. + ExtensionCdxPropValue string } -func (o *LicenseAddition) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing + +func castExtensionCdxPropertyEntry(o any) *ExtensionCdxPropertyEntry { + if o, ok := o.(AnyExtensionCdxPropertyEntry); ok { + return o.asExtensionCdxPropertyEntry() + } + return nil } -func (o *LicenseAddition) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v + +func (o *ExtensionCdxPropertyEntry) asExtensionCdxPropertyEntry() *ExtensionCdxPropertyEntry { + return o } -func (o *LicenseAddition) GetAdditionText() string { - return o.AdditionText +type AnyExtensionCdxPropertyEntry interface { + asExtensionCdxPropertyEntry() *ExtensionCdxPropertyEntry } -func (o *LicenseAddition) SetAdditionText(v string) { - o.AdditionText = v + +type ExtensionCdxPropertyEntryList []AnyExtensionCdxPropertyEntry + +func (o *ExtensionCdxPropertyEntryList) Append(values ...AnyExtensionCdxPropertyEntry) { + *o = append(*o, values...) } -func (o *LicenseAddition) GetIsDeprecatedAdditionId() bool { - return o.IsDeprecatedAdditionId +func (o *ExtensionCdxPropertyEntryList) Remove(value AnyExtensionCdxPropertyEntry) { remove(o, value) } + +func (o *ExtensionCdxPropertyEntryList) ExtensionCdxPropertyEntryIter() iter.Seq2[AnyExtensionCdxPropertyEntry, *ExtensionCdxPropertyEntry] { + return typeIter(*o, castExtensionCdxPropertyEntry) } -func (o *LicenseAddition) SetIsDeprecatedAdditionId(v bool) { - o.IsDeprecatedAdditionId = v + +// A characterization of some aspect of an Element that is associated with the Element in a generalized fashion. +type ExtensionExtension struct { + ID string } -func (o *LicenseAddition) GetLicenseXml() string { - return o.LicenseXml + +func castExtensionExtension(o any) *ExtensionExtension { + if o, ok := o.(AnyExtensionExtension); ok { + return o.asExtensionExtension() + } + return nil } -func (o *LicenseAddition) SetLicenseXml(v string) { - o.LicenseXml = v + +func (o *ExtensionExtension) asExtensionExtension() *ExtensionExtension { + return o } -func (o *LicenseAddition) GetObsoletedBy() string { - return o.ObsoletedBy + +type AnyExtensionExtension interface { + asExtensionExtension() *ExtensionExtension } -func (o *LicenseAddition) SetObsoletedBy(v string) { - o.ObsoletedBy = v + +type ExtensionExtensionList []AnyExtensionExtension + +func (o *ExtensionExtensionList) Append(values ...AnyExtensionExtension) { *o = append(*o, values...) } +func (o *ExtensionExtensionList) Remove(value AnyExtensionExtension) { remove(o, value) } + +func (o *ExtensionExtensionList) ExtensionExtensionIter() iter.Seq2[AnyExtensionExtension, *ExtensionExtension] { + return typeIter(*o, castExtensionExtension) } -func (o *LicenseAddition) GetSeeAlso() []string { - return o.SeeAlso +func (o *ExtensionExtensionList) ExtensionCdxPropertiesExtensionIter() iter.Seq2[AnyExtensionExtension, *ExtensionCdxPropertiesExtension] { + return typeIter(*o, castExtensionCdxPropertiesExtension) } -func (o *LicenseAddition) SetSeeAlso(v ...string) { - o.SeeAlso = v + +// Specifies the CVSS base, temporal, threat, or environmental severity type. +type SecurityCvssSeverityType struct { + ID string } -func (o *LicenseAddition) GetStandardAdditionTemplate() string { - return o.StandardAdditionTemplate + +// When a CVSS score is between 9.0 - 10.0 +var SecurityCvssSeverityType_Critical = SecurityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/critical"} + +// When a CVSS score is between 7.0 - 8.9 +var SecurityCvssSeverityType_High = SecurityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/high"} + +// When a CVSS score is between 0.1 - 3.9 +var SecurityCvssSeverityType_Low = SecurityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/low"} + +// When a CVSS score is between 4.0 - 6.9 +var SecurityCvssSeverityType_Medium = SecurityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/medium"} + +// When a CVSS score is 0.0 +var SecurityCvssSeverityType_None = SecurityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/none"} + +// Specifies the exploit catalog type. +type SecurityExploitCatalogType struct { + ID string } -func (o *LicenseAddition) SetStandardAdditionTemplate(v string) { - o.StandardAdditionTemplate = v + +// CISA's Known Exploited Vulnerability (KEV) Catalog +var SecurityExploitCatalogType_Kev = SecurityExploitCatalogType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType/kev"} + +// Other exploit catalogs +var SecurityExploitCatalogType_Other = SecurityExploitCatalogType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType/other"} + +// Specifies the SSVC decision type. +type SecuritySsvcDecisionType struct { + ID string } -type IListedLicenseException interface { - ILicenseAddition +// The vulnerability requires attention from the organization's internal, supervisory-level and leadership-level individuals. Necessary actions include requesting assistance or information about the vulnerability, as well as publishing a notification either internally and/or externally. Typically, internal groups would meet to determine the overall response and then execute agreed upon actions. CISA recommends remediating Act vulnerabilities as soon as possible. +var SecuritySsvcDecisionType_Act = SecuritySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/act"} - // GetDeprecatedVersion specifies the SPDX License List version in which this license or exception - // identifier was deprecated. - GetDeprecatedVersion() string +// The vulnerability requires attention from the organization's internal, supervisory-level individuals. Necessary actions include requesting assistance or information about the vulnerability, and may involve publishing a notification either internally and/or externally. CISA recommends remediating Attend vulnerabilities sooner than standard update timelines. +var SecuritySsvcDecisionType_Attend = SecuritySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/attend"} - SetDeprecatedVersion(string) +// The vulnerability does not require action at this time. The organization would continue to track the vulnerability and reassess it if new information becomes available. CISA recommends remediating Track vulnerabilities within standard update timelines. +var SecuritySsvcDecisionType_Track = SecuritySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/track"} - // GetListVersionAdded specifies the SPDX License List version in which this ListedLicense or - // ListedLicenseException identifier was first added. - GetListVersionAdded() string +// ("Track\*" in the SSVC spec) The vulnerability contains specific characteristics that may require closer monitoring for changes. CISA recommends remediating Track\* vulnerabilities within standard update timelines. +var SecuritySsvcDecisionType_TrackStar = SecuritySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/trackStar"} - SetListVersionAdded(string) +// Specifies the VEX justification type. +type SecurityVexJustificationType struct { + ID string } -type ListedLicenseException struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/ListedLicenseException" iri-compact:"expandedlicensing_ListedLicenseException" id-prop:"spdxId"` +// The software is not affected because the vulnerable component is not in the product. +var SecurityVexJustificationType_ComponentNotPresent = SecurityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/componentNotPresent"} - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +// Built-in inline controls or mitigations prevent an adversary from leveraging the vulnerability. +var SecurityVexJustificationType_InlineMitigationsAlreadyExist = SecurityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/inlineMitigationsAlreadyExist"} - // AdditionText identifies the full text of a LicenseAddition. - AdditionText string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/additionText" iri-compact:"expandedlicensing_additionText"` - // IsDeprecatedAdditionId specifies whether an additional text identifier has been marked as deprecated. - IsDeprecatedAdditionId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedAdditionId" iri-compact:"expandedlicensing_isDeprecatedAdditionId"` - // LicenseXml identifies all the text and metadata associated with a license in the license - // XML format. - LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` - // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated - // License or LicenseAddition. - ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` - // SeeAlso contains a URL where the License or LicenseAddition can be found in use. - SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` - // StandardAdditionTemplate identifies the full text of a LicenseAddition, in SPDX templating format. - StandardAdditionTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardAdditionTemplate" iri-compact:"expandedlicensing_standardAdditionTemplate"` +// The vulnerable component is present, and the component contains the vulnerable code. However, vulnerable code is used in such a way that an attacker cannot mount any anticipated attack. +var SecurityVexJustificationType_VulnerableCodeCannotBeControlledByAdversary = SecurityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeCannotBeControlledByAdversary"} - // DeprecatedVersion specifies the SPDX License List version in which this license or exception - // identifier was deprecated. - DeprecatedVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/deprecatedVersion" iri-compact:"expandedlicensing_deprecatedVersion"` - // ListVersionAdded specifies the SPDX License List version in which this ListedLicense or - // ListedLicenseException identifier was first added. - ListVersionAdded string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/listVersionAdded" iri-compact:"expandedlicensing_listVersionAdded"` +// The affected code is not reachable through the execution of the code, including non-anticipated states of the product. +var SecurityVexJustificationType_VulnerableCodeNotInExecutePath = SecurityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeNotInExecutePath"} + +// The product is not affected because the code underlying the vulnerability is not present in the product. +var SecurityVexJustificationType_VulnerableCodeNotPresent = SecurityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeNotPresent"} + +// Abstract ancestor class for all vulnerability assessments +type SecurityVulnAssessmentRelationship struct { + Relationship + + // Identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy AnyAgent + + // Specifies an Element contained in a piece of software where a vulnerability was + // found. + SecurityAssessedElement AnySoftwareSoftwareArtifact + + // Specifies a time when a vulnerability assessment was modified + SecurityModifiedTime time.Time + // Specifies the time when a vulnerability was published. + SecurityPublishedTime time.Time + // Specified the time and date when a vulnerability was withdrawn. + SecurityWithdrawnTime time.Time } -func NewListedLicenseException() IListedLicenseException { - return &ListedLicenseException{} +func castSecurityVulnAssessmentRelationship(o any) *SecurityVulnAssessmentRelationship { + if o, ok := o.(AnySecurityVulnAssessmentRelationship); ok { + return o.asSecurityVulnAssessmentRelationship() + } + return nil } -func (o *ListedLicenseException) GetSpdxId() string { - return o.SpdxId +func (o *SecurityVulnAssessmentRelationship) asSecurityVulnAssessmentRelationship() *SecurityVulnAssessmentRelationship { + return o } -func (o *ListedLicenseException) SetSpdxId(v string) { - o.SpdxId = v + +type AnySecurityVulnAssessmentRelationship interface { + AnyRelationship + asSecurityVulnAssessmentRelationship() *SecurityVulnAssessmentRelationship } -func (o *ListedLicenseException) GetComment() string { - return o.Comment + +type SecurityVulnAssessmentRelationshipList []AnySecurityVulnAssessmentRelationship + +func (o *SecurityVulnAssessmentRelationshipList) Append(values ...AnySecurityVulnAssessmentRelationship) { + *o = append(*o, values...) } -func (o *ListedLicenseException) SetComment(v string) { - o.Comment = v +func (o *SecurityVulnAssessmentRelationshipList) Remove(value AnySecurityVulnAssessmentRelationship) { + remove(o, value) } -func (o *ListedLicenseException) GetCreationInfo() ICreationInfo { - return o.CreationInfo + +func (o *SecurityVulnAssessmentRelationshipList) SecurityVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVulnAssessmentRelationship) } -func (o *ListedLicenseException) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v +func (o *SecurityVulnAssessmentRelationshipList) SecurityCvssV2VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityCvssV2VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV2VulnAssessmentRelationship) } -func (o *ListedLicenseException) GetDescription() string { - return o.Description +func (o *SecurityVulnAssessmentRelationshipList) SecurityCvssV3VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityCvssV3VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV3VulnAssessmentRelationship) } -func (o *ListedLicenseException) SetDescription(v string) { - o.Description = v +func (o *SecurityVulnAssessmentRelationshipList) SecurityCvssV4VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityCvssV4VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV4VulnAssessmentRelationship) } -func (o *ListedLicenseException) GetExtensions() []IExtension { - return o.Extensions +func (o *SecurityVulnAssessmentRelationshipList) SecurityEpssVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityEpssVulnAssessmentRelationship] { + return typeIter(*o, castSecurityEpssVulnAssessmentRelationship) } -func (o *ListedLicenseException) SetExtensions(v ...IExtension) { - o.Extensions = v +func (o *SecurityVulnAssessmentRelationshipList) SecurityExploitCatalogVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityExploitCatalogVulnAssessmentRelationship] { + return typeIter(*o, castSecurityExploitCatalogVulnAssessmentRelationship) } -func (o *ListedLicenseException) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers +func (o *SecurityVulnAssessmentRelationshipList) SecuritySsvcVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecuritySsvcVulnAssessmentRelationship] { + return typeIter(*o, castSecuritySsvcVulnAssessmentRelationship) } -func (o *ListedLicenseException) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v +func (o *SecurityVulnAssessmentRelationshipList) SecurityVexVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVexVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexVulnAssessmentRelationship) } -func (o *ListedLicenseException) GetExternalRefs() []IExternalRef { - return o.ExternalRefs +func (o *SecurityVulnAssessmentRelationshipList) SecurityVexAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVexAffectedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexAffectedVulnAssessmentRelationship) } -func (o *ListedLicenseException) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v +func (o *SecurityVulnAssessmentRelationshipList) SecurityVexFixedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVexFixedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexFixedVulnAssessmentRelationship) } -func (o *ListedLicenseException) GetName() string { - return o.Name +func (o *SecurityVulnAssessmentRelationshipList) SecurityVexNotAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVexNotAffectedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexNotAffectedVulnAssessmentRelationship) } -func (o *ListedLicenseException) SetName(v string) { - o.Name = v +func (o *SecurityVulnAssessmentRelationshipList) SecurityVexUnderInvestigationVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVexUnderInvestigationVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexUnderInvestigationVulnAssessmentRelationship) } -func (o *ListedLicenseException) GetSummary() string { - return o.Summary + +// Abstract class representing a license combination consisting of one or more licenses. +type SimplelicensingAnyLicenseInfo struct { + Element } -func (o *ListedLicenseException) SetSummary(v string) { - o.Summary = v + +func castSimplelicensingAnyLicenseInfo(o any) *SimplelicensingAnyLicenseInfo { + if o, ok := o.(AnySimplelicensingAnyLicenseInfo); ok { + return o.asSimplelicensingAnyLicenseInfo() + } + return nil } -func (o *ListedLicenseException) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing + +func (o *SimplelicensingAnyLicenseInfo) asSimplelicensingAnyLicenseInfo() *SimplelicensingAnyLicenseInfo { + return o } -func (o *ListedLicenseException) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v + +type AnySimplelicensingAnyLicenseInfo interface { + AnyElement + asSimplelicensingAnyLicenseInfo() *SimplelicensingAnyLicenseInfo } -func (o *ListedLicenseException) GetAdditionText() string { - return o.AdditionText +type SimplelicensingAnyLicenseInfoList []AnySimplelicensingAnyLicenseInfo + +func (o *SimplelicensingAnyLicenseInfoList) Append(values ...AnySimplelicensingAnyLicenseInfo) { + *o = append(*o, values...) } -func (o *ListedLicenseException) SetAdditionText(v string) { - o.AdditionText = v +func (o *SimplelicensingAnyLicenseInfoList) Remove(value AnySimplelicensingAnyLicenseInfo) { + remove(o, value) } -func (o *ListedLicenseException) GetIsDeprecatedAdditionId() bool { - return o.IsDeprecatedAdditionId + +func (o *SimplelicensingAnyLicenseInfoList) SimplelicensingAnyLicenseInfoIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *SimplelicensingAnyLicenseInfo] { + return typeIter(*o, castSimplelicensingAnyLicenseInfo) +} +func (o *SimplelicensingAnyLicenseInfoList) SimplelicensingLicenseExpressionIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *SimplelicensingLicenseExpression] { + return typeIter(*o, castSimplelicensingLicenseExpression) } -func (o *ListedLicenseException) SetIsDeprecatedAdditionId(v bool) { - o.IsDeprecatedAdditionId = v +func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingConjunctiveLicenseSetIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingConjunctiveLicenseSet] { + return typeIter(*o, castExpandedlicensingConjunctiveLicenseSet) } -func (o *ListedLicenseException) GetLicenseXml() string { - return o.LicenseXml +func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingDisjunctiveLicenseSetIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingDisjunctiveLicenseSet] { + return typeIter(*o, castExpandedlicensingDisjunctiveLicenseSet) } -func (o *ListedLicenseException) SetLicenseXml(v string) { - o.LicenseXml = v +func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingExtendableLicenseIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingExtendableLicense] { + return typeIter(*o, castExpandedlicensingExtendableLicense) } -func (o *ListedLicenseException) GetObsoletedBy() string { - return o.ObsoletedBy +func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingIndividualLicensingInfoIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingIndividualLicensingInfo] { + return typeIter(*o, castExpandedlicensingIndividualLicensingInfo) } -func (o *ListedLicenseException) SetObsoletedBy(v string) { - o.ObsoletedBy = v +func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingLicenseIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingLicense] { + return typeIter(*o, castExpandedlicensingLicense) } -func (o *ListedLicenseException) GetSeeAlso() []string { - return o.SeeAlso +func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingListedLicenseIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingListedLicense] { + return typeIter(*o, castExpandedlicensingListedLicense) } -func (o *ListedLicenseException) SetSeeAlso(v ...string) { - o.SeeAlso = v +func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingOrLaterOperatorIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingOrLaterOperator] { + return typeIter(*o, castExpandedlicensingOrLaterOperator) } -func (o *ListedLicenseException) GetStandardAdditionTemplate() string { - return o.StandardAdditionTemplate +func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingWithAdditionOperatorIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingWithAdditionOperator] { + return typeIter(*o, castExpandedlicensingWithAdditionOperator) } -func (o *ListedLicenseException) SetStandardAdditionTemplate(v string) { - o.StandardAdditionTemplate = v +func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingCustomLicenseIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingCustomLicense] { + return typeIter(*o, castExpandedlicensingCustomLicense) } -func (o *ListedLicenseException) GetDeprecatedVersion() string { - return o.DeprecatedVersion +// An SPDX Element containing an SPDX license expression string. +type SimplelicensingLicenseExpression struct { + SimplelicensingAnyLicenseInfo + + // Maps a LicenseRef or AdditionRef string for a Custom License or a Custom + // License Addition to its URI ID. + SimplelicensingCustomIdToUris DictionaryEntryList + + // A string in the license expression format. + SimplelicensingLicenseExpression string + // The version of the SPDX License List used in the license expression. + SimplelicensingLicenseListVersion string } -func (o *ListedLicenseException) SetDeprecatedVersion(v string) { - o.DeprecatedVersion = v + +func castSimplelicensingLicenseExpression(o any) *SimplelicensingLicenseExpression { + if o, ok := o.(AnySimplelicensingLicenseExpression); ok { + return o.asSimplelicensingLicenseExpression() + } + return nil } -func (o *ListedLicenseException) GetListVersionAdded() string { - return o.ListVersionAdded + +func (o *SimplelicensingLicenseExpression) asSimplelicensingLicenseExpression() *SimplelicensingLicenseExpression { + return o } -func (o *ListedLicenseException) SetListVersionAdded(v string) { - o.ListVersionAdded = v + +type AnySimplelicensingLicenseExpression interface { + AnySimplelicensingAnyLicenseInfo + asSimplelicensingLicenseExpression() *SimplelicensingLicenseExpression } -type ICdxPropertyEntry interface { +type SimplelicensingLicenseExpressionList []AnySimplelicensingLicenseExpression - // GetCdxPropName a name used in a CdxExtension name-value pair. - GetCdxPropName() string +func (o *SimplelicensingLicenseExpressionList) Append(values ...AnySimplelicensingLicenseExpression) { + *o = append(*o, values...) +} +func (o *SimplelicensingLicenseExpressionList) Remove(value AnySimplelicensingLicenseExpression) { + remove(o, value) +} - SetCdxPropName(string) +func (o *SimplelicensingLicenseExpressionList) SimplelicensingLicenseExpressionIter() iter.Seq2[AnySimplelicensingLicenseExpression, *SimplelicensingLicenseExpression] { + return typeIter(*o, castSimplelicensingLicenseExpression) +} - // GetCdxPropValue a value used in a CdxExtension name-value pair. - GetCdxPropValue() string +// A license or addition that is not listed on the SPDX License List. +type SimplelicensingSimpleLicensingText struct { + Element - SetCdxPropValue(string) + // Identifies the full text of a License or Addition. + SimplelicensingLicenseText string } -type CdxPropertyEntry struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/CdxPropertyEntry" iri-compact:"extension_CdxPropertyEntry"` +func castSimplelicensingSimpleLicensingText(o any) *SimplelicensingSimpleLicensingText { + if o, ok := o.(AnySimplelicensingSimpleLicensingText); ok { + return o.asSimplelicensingSimpleLicensingText() + } + return nil +} - Iri string `iri:"@id"` +func (o *SimplelicensingSimpleLicensingText) asSimplelicensingSimpleLicensingText() *SimplelicensingSimpleLicensingText { + return o +} - // CdxPropName a name used in a CdxExtension name-value pair. - CdxPropName string `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/cdxPropName" iri-compact:"extension_cdxPropName"` - // CdxPropValue a value used in a CdxExtension name-value pair. - CdxPropValue string `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/cdxPropValue" iri-compact:"extension_cdxPropValue"` +type AnySimplelicensingSimpleLicensingText interface { + AnyElement + asSimplelicensingSimpleLicensingText() *SimplelicensingSimpleLicensingText } -func NewCdxPropertyEntry() ICdxPropertyEntry { - return &CdxPropertyEntry{} +type SimplelicensingSimpleLicensingTextList []AnySimplelicensingSimpleLicensingText + +func (o *SimplelicensingSimpleLicensingTextList) Append(values ...AnySimplelicensingSimpleLicensingText) { + *o = append(*o, values...) +} +func (o *SimplelicensingSimpleLicensingTextList) Remove(value AnySimplelicensingSimpleLicensingText) { + remove(o, value) } -func (o *CdxPropertyEntry) GetCdxPropName() string { - return o.CdxPropName +func (o *SimplelicensingSimpleLicensingTextList) SimplelicensingSimpleLicensingTextIter() iter.Seq2[AnySimplelicensingSimpleLicensingText, *SimplelicensingSimpleLicensingText] { + return typeIter(*o, castSimplelicensingSimpleLicensingText) } -func (o *CdxPropertyEntry) SetCdxPropName(v string) { - o.CdxPropName = v + +// A canonical, unique, immutable identifier +type SoftwareContentIdentifier struct { + IntegrityMethod + + // Specifies the type of the content identifier. + SoftwareContentIdentifierType SoftwareContentIdentifierType + // Specifies the value of the content identifier. + SoftwareContentIdentifierValue string } -func (o *CdxPropertyEntry) GetCdxPropValue() string { - return o.CdxPropValue + +func castSoftwareContentIdentifier(o any) *SoftwareContentIdentifier { + if o, ok := o.(AnySoftwareContentIdentifier); ok { + return o.asSoftwareContentIdentifier() + } + return nil } -func (o *CdxPropertyEntry) SetCdxPropValue(v string) { - o.CdxPropValue = v + +func (o *SoftwareContentIdentifier) asSoftwareContentIdentifier() *SoftwareContentIdentifier { + return o } -type IExtension interface { +type AnySoftwareContentIdentifier interface { + AnyIntegrityMethod + asSoftwareContentIdentifier() *SoftwareContentIdentifier } -type Extension struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/Extension" iri-compact:"extension_Extension"` +type SoftwareContentIdentifierList []AnySoftwareContentIdentifier - Iri string `iri:"@id"` +func (o *SoftwareContentIdentifierList) Append(values ...AnySoftwareContentIdentifier) { + *o = append(*o, values...) } +func (o *SoftwareContentIdentifierList) Remove(value AnySoftwareContentIdentifier) { remove(o, value) } -type CvssSeverityType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType" iri-compact:"security_CvssSeverityType"` +func (o *SoftwareContentIdentifierList) SoftwareContentIdentifierIter() iter.Seq2[AnySoftwareContentIdentifier, *SoftwareContentIdentifier] { + return typeIter(*o, castSoftwareContentIdentifier) +} - Iri string `iri:"@id"` +// Specifies the type of a content identifier. +type SoftwareContentIdentifierType struct { + ID string } -var ( - CvssSeverityType_Critical = CvssSeverityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/critical"} - CvssSeverityType_High = CvssSeverityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/high"} - CvssSeverityType_Low = CvssSeverityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/low"} - CvssSeverityType_Medium = CvssSeverityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/medium"} - CvssSeverityType_None = CvssSeverityType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/none"} -) +// [Gitoid](https://www.iana.org/assignments/uri-schemes/prov/gitoid), stands for [Git Object ID](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). A gitoid of type blob is a unique hash of a binary artifact. A gitoid may represent either an [Artifact Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-identifier-types) for the software artifact or an [Input Manifest Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#input-manifest-identifier) for the software artifact's associated [Artifact Input Manifest](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-input-manifest); this ambiguity exists because the Artifact Input Manifest is itself an artifact, and the gitoid of that artifact is its valid identifier. Gitoids calculated on software artifacts (Snippet, File, or Package Elements) should be recorded in the SPDX 3.0 SoftwareArtifact's contentIdentifier property. Gitoids calculated on the Artifact Input Manifest (Input Manifest Identifier) should be recorded in the SPDX 3.0 Element's externalIdentifier property. See [OmniBOR Specification](https://github.com/omnibor/spec/), a minimalistic specification for describing software [Artifact Dependency Graphs](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-dependency-graph-adg). +var SoftwareContentIdentifierType_Gitoid = SoftwareContentIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType/gitoid"} -type ExploitCatalogType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogType" iri-compact:"security_ExploitCatalogType"` +// SoftWare Hash IDentifier, a persistent intrinsic identifier for digital artifacts, such as files, trees (also known as directories or folders), commits, and other objects typically found in version control systems. The format of the identifiers is defined in the [SWHID specification](https://www.swhid.org/specification/v1.1/4.Syntax) (ISO/IEC DIS 18670). They typically look like `swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2`. +var SoftwareContentIdentifierType_Swhid = SoftwareContentIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType/swhid"} - Iri string `iri:"@id"` +// Enumeration of the different kinds of SPDX file. +type SoftwareFileKindType struct { + ID string } -var ( - ExploitCatalogType_Kev = ExploitCatalogType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogType/kev"} - ExploitCatalogType_Other = ExploitCatalogType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogType/other"} -) +// The file represents a directory and all content stored in that directory. +var SoftwareFileKindType_Directory = SoftwareFileKindType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType/directory"} -type SsvcDecisionType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType" iri-compact:"security_SsvcDecisionType"` +// The file represents a single file (default). +var SoftwareFileKindType_File = SoftwareFileKindType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType/file"} - Iri string `iri:"@id"` +// Provides a set of values to be used to describe the common types of SBOMs that +// tools may create. +type SoftwareSbomType struct { + ID string } -var ( - SsvcDecisionType_Act = SsvcDecisionType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/act"} - SsvcDecisionType_Attend = SsvcDecisionType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/attend"} - SsvcDecisionType_Track = SsvcDecisionType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/track"} - SsvcDecisionType_TrackStar = SsvcDecisionType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/trackStar"} -) +// SBOM generated through analysis of artifacts (e.g., executables, packages, containers, and virtual machine images) after its build. Such analysis generally requires a variety of heuristics. In some contexts, this may also be referred to as a "3rd party" SBOM. +var SoftwareSbomType_Analyzed = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/analyzed"} + +// SBOM generated as part of the process of building the software to create a releasable artifact (e.g., executable or package) from data such as source files, dependencies, built components, build process ephemeral data, and other SBOMs. +var SoftwareSbomType_Build = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/build"} + +// SBOM provides an inventory of software that is present on a system. This may be an assembly of other SBOMs that combines analysis of configuration options, and examination of execution behavior in a (potentially simulated) deployment environment. +var SoftwareSbomType_Deployed = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/deployed"} + +// SBOM of intended, planned software project or product with included components (some of which may not yet exist) for a new software artifact. +var SoftwareSbomType_Design = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/design"} -type VexJustificationType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType" iri-compact:"security_VexJustificationType"` +// SBOM generated through instrumenting the system running the software, to capture only components present in the system, as well as external call-outs or dynamically loaded components. In some contexts, this may also be referred to as an "Instrumented" or "Dynamic" SBOM. +var SoftwareSbomType_Runtime = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/runtime"} - Iri string `iri:"@id"` +// SBOM created directly from the development environment, source files, and included dependencies used to build an product artifact. +var SoftwareSbomType_Source = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/source"} + +// Provides information about the primary purpose of an Element. +type SoftwareSoftwarePurpose struct { + ID string } -var ( - VexJustificationType_ComponentNotPresent = VexJustificationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/componentNotPresent"} - VexJustificationType_InlineMitigationsAlreadyExist = VexJustificationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/inlineMitigationsAlreadyExist"} - VexJustificationType_VulnerableCodeCannotBeControlledByAdversary = VexJustificationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeCannotBeControlledByAdversary"} - VexJustificationType_VulnerableCodeNotInExecutePath = VexJustificationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeNotInExecutePath"} - VexJustificationType_VulnerableCodeNotPresent = VexJustificationType{Iri: "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeNotPresent"} -) +// The Element is a software application. +var SoftwareSoftwarePurpose_Application = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/application"} -type IVulnAssessmentRelationship interface { - IRelationship +// The Element is an archived collection of one or more files (.tar, .zip, etc.). +var SoftwareSoftwarePurpose_Archive = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/archive"} - // GetSuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - GetSuppliedBy() IAgent +// The Element is a bill of materials. +var SoftwareSoftwarePurpose_Bom = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/bom"} - SetSuppliedBy(IAgent) +// The Element is configuration data. +var SoftwareSoftwarePurpose_Configuration = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/configuration"} - // GetAssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - GetAssessedElement() IElement +// The Element is a container image which can be used by a container runtime application. +var SoftwareSoftwarePurpose_Container = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/container"} - SetAssessedElement(IElement) +// The Element is data. +var SoftwareSoftwarePurpose_Data = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/data"} - // GetModifiedTime specifies a time when a vulnerability assessment was modified - GetModifiedTime() string +// The Element refers to a chipset, processor, or electronic board. +var SoftwareSoftwarePurpose_Device = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/device"} - SetModifiedTime(string) +// The Element represents software that controls hardware devices. +var SoftwareSoftwarePurpose_DeviceDriver = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/deviceDriver"} - // GetPublishedTime specifies the time when a vulnerability was published. - GetPublishedTime() string +// The Element refers to a disk image that can be written to a disk, booted in a VM, etc. A disk image typically contains most or all of the components necessary to boot, such as bootloaders, kernels, firmware, userspace, etc. +var SoftwareSoftwarePurpose_DiskImage = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/diskImage"} - SetPublishedTime(string) +// The Element is documentation. +var SoftwareSoftwarePurpose_Documentation = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/documentation"} - // GetWithdrawnTime specified the time and date when a vulnerability was withdrawn. - GetWithdrawnTime() string +// The Element is the evidence that a specification or requirement has been fulfilled. +var SoftwareSoftwarePurpose_Evidence = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/evidence"} - SetWithdrawnTime(string) -} +// The Element is an Artifact that can be run on a computer. +var SoftwareSoftwarePurpose_Executable = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/executable"} -type VulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VulnAssessmentRelationship" iri-compact:"security_VulnAssessmentRelationship" id-prop:"spdxId"` +// The Element is a single file which can be independently distributed (configuration file, statically linked binary, Kubernetes deployment, etc.). +var SoftwareSoftwarePurpose_File = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/file"} - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` -} +// The Element is a file system image that can be written to a disk (or virtual) partition. +var SoftwareSoftwarePurpose_FilesystemImage = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/filesystemImage"} -func (o *VulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *VulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *VulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *VulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *VulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *VulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *VulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *VulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *VulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *VulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *VulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *VulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *VulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs +// The Element provides low level control over a device's hardware. +var SoftwareSoftwarePurpose_Firmware = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/firmware"} + +// The Element is a software framework. +var SoftwareSoftwarePurpose_Framework = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/framework"} + +// The Element is used to install software on disk. +var SoftwareSoftwarePurpose_Install = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/install"} + +// The Element is a software library. +var SoftwareSoftwarePurpose_Library = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/library"} + +// The Element is a software manifest. +var SoftwareSoftwarePurpose_Manifest = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/manifest"} + +// The Element is a machine learning or artificial intelligence model. +var SoftwareSoftwarePurpose_Model = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/model"} + +// The Element is a module of a piece of software. +var SoftwareSoftwarePurpose_Module = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/module"} + +// The Element is an operating system. +var SoftwareSoftwarePurpose_OperatingSystem = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/operatingSystem"} + +// The Element doesn't fit into any of the other categories. +var SoftwareSoftwarePurpose_Other = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/other"} + +// The Element contains a set of changes to update, fix, or improve another Element. +var SoftwareSoftwarePurpose_Patch = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/patch"} + +// The Element represents a runtime environment. +var SoftwareSoftwarePurpose_Platform = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/platform"} + +// The Element provides a requirement needed as input for another Element. +var SoftwareSoftwarePurpose_Requirement = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/requirement"} + +// The Element is a single or a collection of source files. +var SoftwareSoftwarePurpose_Source = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/source"} + +// The Element is a plan, guideline or strategy how to create, perform or analyze an application. +var SoftwareSoftwarePurpose_Specification = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/specification"} + +// The Element is a test used to verify functionality on an software element. +var SoftwareSoftwarePurpose_Test = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/test"} + +// Class that describes a build instance of software/artifacts. +type BuildBuild struct { + Element + + // Property that describes the time at which a build stops. + BuildBuildEndTime time.Time + // A buildId is a locally unique identifier used by a builder to identify a unique + // instance of a build produced by it. + BuildBuildId string + // Property describing the start time of a build. + BuildBuildStartTime time.Time + // A buildType is a hint that is used to indicate the toolchain, platform, or + // infrastructure that the build was invoked on. + BuildBuildType string + // Property that describes the digest of the build configuration file used to + // invoke a build. + BuildConfigSourceDigests HashList + + // Property describes the invocation entrypoint of a build. + BuildConfigSourceEntrypoints []string + // Property that describes the URI of the build configuration source file. + BuildConfigSourceUris []string + // Property describing the session in which a build is invoked. + BuildEnvironments DictionaryEntryList + + // Property describing a parameter used in an instance of a build. + BuildParameters DictionaryEntryList } -func (o *VulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v + +func castBuildBuild(o any) *BuildBuild { + if o, ok := o.(AnyBuildBuild); ok { + return o.asBuildBuild() + } + return nil } -func (o *VulnAssessmentRelationship) GetName() string { - return o.Name + +func (o *BuildBuild) asBuildBuild() *BuildBuild { + return o } -func (o *VulnAssessmentRelationship) SetName(v string) { - o.Name = v + +type AnyBuildBuild interface { + AnyElement + asBuildBuild() *BuildBuild } -func (o *VulnAssessmentRelationship) GetSummary() string { - return o.Summary + +type BuildBuildList []AnyBuildBuild + +func (o *BuildBuildList) Append(values ...AnyBuildBuild) { *o = append(*o, values...) } +func (o *BuildBuildList) Remove(value AnyBuildBuild) { remove(o, value) } + +func (o *BuildBuildList) BuildBuildIter() iter.Seq2[AnyBuildBuild, *BuildBuild] { + return typeIter(*o, castBuildBuild) } -func (o *VulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v + +// Agent represents anything with the potential to act on a system. +type Agent struct { + Element } -func (o *VulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing + +func castAgent(o any) *Agent { + if o, ok := o.(AnyAgent); ok { + return o.asAgent() + } + return nil } -func (o *VulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v + +func (o *Agent) asAgent() *Agent { + return o } -func (o *VulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness +type AnyAgent interface { + AnyElement + asAgent() *Agent } -func (o *VulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v + +type AgentList []AnyAgent + +func (o *AgentList) Append(values ...AnyAgent) { *o = append(*o, values...) } +func (o *AgentList) Remove(value AnyAgent) { remove(o, value) } + +func (o *AgentList) AgentIter() iter.Seq2[AnyAgent, *Agent] { return typeIter(*o, castAgent) } +func (o *AgentList) OrganizationIter() iter.Seq2[AnyAgent, *Organization] { + return typeIter(*o, castOrganization) } -func (o *VulnAssessmentRelationship) GetEndTime() string { - return o.EndTime +func (o *AgentList) PersonIter() iter.Seq2[AnyAgent, *Person] { return typeIter(*o, castPerson) } +func (o *AgentList) SoftwareAgentIter() iter.Seq2[AnyAgent, *SoftwareAgent] { + return typeIter(*o, castSoftwareAgent) } -func (o *VulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v + +// An assertion made in relation to one or more elements. +type Annotation struct { + Element + + // Describes the type of annotation. + AnnotationType AnnotationType + // Provides information about the content type of an Element or a Property. + ContentType string + // Commentary on an assertion that an annotator has made. + Statement string + // An Element an annotator has made an assertion about. + Subject AnyElement } -func (o *VulnAssessmentRelationship) GetFrom() IElement { - return o.From + +func castAnnotation(o any) *Annotation { + if o, ok := o.(AnyAnnotation); ok { + return o.asAnnotation() + } + return nil } -func (o *VulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v + +func (o *Annotation) asAnnotation() *Annotation { + return o } -func (o *VulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType + +type AnyAnnotation interface { + AnyElement + asAnnotation() *Annotation } -func (o *VulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v + +type AnnotationList []AnyAnnotation + +func (o *AnnotationList) Append(values ...AnyAnnotation) { *o = append(*o, values...) } +func (o *AnnotationList) Remove(value AnyAnnotation) { remove(o, value) } + +func (o *AnnotationList) AnnotationIter() iter.Seq2[AnyAnnotation, *Annotation] { + return typeIter(*o, castAnnotation) } -func (o *VulnAssessmentRelationship) GetStartTime() string { - return o.StartTime + +// A distinct article or unit within the digital domain. +type Artifact struct { + Element + + // Specifies the time an artifact was built. + BuiltTime time.Time + // Identifies from where or whom the Element originally came. + OriginatedBys AgentList + + // Specifies the time an artifact was released. + ReleaseTime time.Time + // The name of a relevant standard that may apply to an artifact. + StandardNames []string + // Identifies who or what supplied the artifact or VulnAssessmentRelationship + // referenced by the Element. + SuppliedBy AnyAgent + + // Specifies the level of support associated with an artifact. + SupportLevels []SupportType + // Specifies until when the artifact can be used before its usage needs to be + // reassessed. + ValidUntilTime time.Time } -func (o *VulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v + +func castArtifact(o any) *Artifact { + if o, ok := o.(AnyArtifact); ok { + return o.asArtifact() + } + return nil } -func (o *VulnAssessmentRelationship) GetTo() []IElement { - return o.To + +func (o *Artifact) asArtifact() *Artifact { + return o } -func (o *VulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v + +type AnyArtifact interface { + AnyElement + asArtifact() *Artifact } -func (o *VulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy +type ArtifactList []AnyArtifact + +func (o *ArtifactList) Append(values ...AnyArtifact) { *o = append(*o, values...) } +func (o *ArtifactList) Remove(value AnyArtifact) { remove(o, value) } + +func (o *ArtifactList) ArtifactIter() iter.Seq2[AnyArtifact, *Artifact] { + return typeIter(*o, castArtifact) +} +func (o *ArtifactList) SecurityVulnerabilityIter() iter.Seq2[AnyArtifact, *SecurityVulnerability] { + return typeIter(*o, castSecurityVulnerability) } -func (o *VulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v +func (o *ArtifactList) SoftwareSoftwareArtifactIter() iter.Seq2[AnyArtifact, *SoftwareSoftwareArtifact] { + return typeIter(*o, castSoftwareSoftwareArtifact) } -func (o *VulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement +func (o *ArtifactList) SoftwareFileIter() iter.Seq2[AnyArtifact, *SoftwareFile] { + return typeIter(*o, castSoftwareFile) } -func (o *VulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v +func (o *ArtifactList) SoftwarePackageIter() iter.Seq2[AnyArtifact, *SoftwarePackage] { + return typeIter(*o, castSoftwarePackage) } -func (o *VulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime +func (o *ArtifactList) SoftwareSnippetIter() iter.Seq2[AnyArtifact, *SoftwareSnippet] { + return typeIter(*o, castSoftwareSnippet) } -func (o *VulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v +func (o *ArtifactList) AiAIPackageIter() iter.Seq2[AnyArtifact, *AiAIPackage] { + return typeIter(*o, castAiAIPackage) } -func (o *VulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime +func (o *ArtifactList) DatasetDatasetPackageIter() iter.Seq2[AnyArtifact, *DatasetDatasetPackage] { + return typeIter(*o, castDatasetDatasetPackage) } -func (o *VulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v + +// A collection of Elements that have a shared context. +type Bundle struct { + ElementCollection + + // Gives information about the circumstances or unifying properties + // that Elements of the bundle have been assembled under. + Context string } -func (o *VulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime + +func castBundle(o any) *Bundle { + if o, ok := o.(AnyBundle); ok { + return o.asBundle() + } + return nil } -func (o *VulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v + +func (o *Bundle) asBundle() *Bundle { + return o } -type IAnyLicenseInfo interface { - IElement +type AnyBundle interface { + AnyElementCollection + asBundle() *Bundle } -type AnyLicenseInfo struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/AnyLicenseInfo" iri-compact:"simplelicensing_AnyLicenseInfo" id-prop:"spdxId"` +type BundleList []AnyBundle - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +func (o *BundleList) Append(values ...AnyBundle) { *o = append(*o, values...) } +func (o *BundleList) Remove(value AnyBundle) { remove(o, value) } + +func (o *BundleList) BundleIter() iter.Seq2[AnyBundle, *Bundle] { return typeIter(*o, castBundle) } +func (o *BundleList) BomIter() iter.Seq2[AnyBundle, *Bom] { return typeIter(*o, castBom) } +func (o *BundleList) SoftwareSbomIter() iter.Seq2[AnyBundle, *SoftwareSbom] { + return typeIter(*o, castSoftwareSbom) } -func (o *AnyLicenseInfo) GetSpdxId() string { - return o.SpdxId +// A mathematically calculated representation of a grouping of data. +type Hash struct { + IntegrityMethod + + // Specifies the algorithm used for calculating the hash value. + Algorithm HashAlgorithm + // The result of applying a hash algorithm to an Element. + HashValue string } -func (o *AnyLicenseInfo) SetSpdxId(v string) { - o.SpdxId = v + +func castHash(o any) *Hash { + if o, ok := o.(AnyHash); ok { + return o.asHash() + } + return nil } -func (o *AnyLicenseInfo) GetComment() string { - return o.Comment + +func (o *Hash) asHash() *Hash { + return o } -func (o *AnyLicenseInfo) SetComment(v string) { - o.Comment = v + +type AnyHash interface { + AnyIntegrityMethod + asHash() *Hash } -func (o *AnyLicenseInfo) GetCreationInfo() ICreationInfo { - return o.CreationInfo + +type HashList []AnyHash + +func (o *HashList) Append(values ...AnyHash) { *o = append(*o, values...) } +func (o *HashList) Remove(value AnyHash) { remove(o, value) } + +func (o *HashList) HashIter() iter.Seq2[AnyHash, *Hash] { return typeIter(*o, castHash) } + +// Provide context for a relationship that occurs in the lifecycle. +type LifecycleScopedRelationship struct { + Relationship + + // Capture the scope of information about a specific relationship between elements. + Scope LifecycleScopeType } -func (o *AnyLicenseInfo) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v + +func castLifecycleScopedRelationship(o any) *LifecycleScopedRelationship { + if o, ok := o.(AnyLifecycleScopedRelationship); ok { + return o.asLifecycleScopedRelationship() + } + return nil } -func (o *AnyLicenseInfo) GetDescription() string { - return o.Description + +func (o *LifecycleScopedRelationship) asLifecycleScopedRelationship() *LifecycleScopedRelationship { + return o } -func (o *AnyLicenseInfo) SetDescription(v string) { - o.Description = v + +type AnyLifecycleScopedRelationship interface { + AnyRelationship + asLifecycleScopedRelationship() *LifecycleScopedRelationship } -func (o *AnyLicenseInfo) GetExtensions() []IExtension { - return o.Extensions + +type LifecycleScopedRelationshipList []AnyLifecycleScopedRelationship + +func (o *LifecycleScopedRelationshipList) Append(values ...AnyLifecycleScopedRelationship) { + *o = append(*o, values...) } -func (o *AnyLicenseInfo) SetExtensions(v ...IExtension) { - o.Extensions = v +func (o *LifecycleScopedRelationshipList) Remove(value AnyLifecycleScopedRelationship) { + remove(o, value) } -func (o *AnyLicenseInfo) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers + +func (o *LifecycleScopedRelationshipList) LifecycleScopedRelationshipIter() iter.Seq2[AnyLifecycleScopedRelationship, *LifecycleScopedRelationship] { + return typeIter(*o, castLifecycleScopedRelationship) } -func (o *AnyLicenseInfo) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v + +// A group of people who work together in an organized way for a shared purpose. +type Organization struct { + Agent } -func (o *AnyLicenseInfo) GetExternalRefs() []IExternalRef { - return o.ExternalRefs + +// An Organization representing the SPDX Project. +var Organization_SpdxOrganization = Organization{Agent: Agent{Element: Element{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SpdxOrganization"}}} + +func castOrganization(o any) *Organization { + if o, ok := o.(AnyOrganization); ok { + return o.asOrganization() + } + return nil } -func (o *AnyLicenseInfo) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v + +func (o *Organization) asOrganization() *Organization { + return o } -func (o *AnyLicenseInfo) GetName() string { - return o.Name + +type AnyOrganization interface { + AnyAgent + asOrganization() *Organization } -func (o *AnyLicenseInfo) SetName(v string) { - o.Name = v + +type OrganizationList []AnyOrganization + +func (o *OrganizationList) Append(values ...AnyOrganization) { *o = append(*o, values...) } +func (o *OrganizationList) Remove(value AnyOrganization) { remove(o, value) } + +func (o *OrganizationList) OrganizationIter() iter.Seq2[AnyOrganization, *Organization] { + return typeIter(*o, castOrganization) } -func (o *AnyLicenseInfo) GetSummary() string { - return o.Summary + +// An individual human being. +type Person struct { + Agent } -func (o *AnyLicenseInfo) SetSummary(v string) { - o.Summary = v + +func castPerson(o any) *Person { + if o, ok := o.(AnyPerson); ok { + return o.asPerson() + } + return nil } -func (o *AnyLicenseInfo) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing + +func (o *Person) asPerson() *Person { + return o } -func (o *AnyLicenseInfo) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v + +type AnyPerson interface { + AnyAgent + asPerson() *Person } -type ILicenseExpression interface { - IAnyLicenseInfo +type PersonList []AnyPerson - // GetCustomIdToUri maps a LicenseRef or AdditionRef string for a Custom License or a Custom - // License Addition to its URI ID. - GetCustomIdToUri() []IDictionaryEntry +func (o *PersonList) Append(values ...AnyPerson) { *o = append(*o, values...) } +func (o *PersonList) Remove(value AnyPerson) { remove(o, value) } - SetCustomIdToUri(...IDictionaryEntry) +func (o *PersonList) PersonIter() iter.Seq2[AnyPerson, *Person] { return typeIter(*o, castPerson) } - // GetLicenseExpression a string in the license expression format. - GetLicenseExpression() string +// A software agent. +type SoftwareAgent struct { + Agent +} - SetLicenseExpression(string) +func castSoftwareAgent(o any) *SoftwareAgent { + if o, ok := o.(AnySoftwareAgent); ok { + return o.asSoftwareAgent() + } + return nil +} - // GetLicenseListVersion the version of the SPDX License List used in the license expression. - GetLicenseListVersion() string +func (o *SoftwareAgent) asSoftwareAgent() *SoftwareAgent { + return o +} - SetLicenseListVersion(string) +type AnySoftwareAgent interface { + AnyAgent + asSoftwareAgent() *SoftwareAgent } -type LicenseExpression struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/LicenseExpression" iri-compact:"simplelicensing_LicenseExpression" id-prop:"spdxId"` +type SoftwareAgentList []AnySoftwareAgent - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +func (o *SoftwareAgentList) Append(values ...AnySoftwareAgent) { *o = append(*o, values...) } +func (o *SoftwareAgentList) Remove(value AnySoftwareAgent) { remove(o, value) } - // CustomIdToUri maps a LicenseRef or AdditionRef string for a Custom License or a Custom - // License Addition to its URI ID. - CustomIdToUri []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/customIdToUri" iri-compact:"simplelicensing_customIdToUri"` - // LicenseExpression a string in the license expression format. - LicenseExpression string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseExpression" iri-compact:"simplelicensing_licenseExpression"` - // LicenseListVersion the version of the SPDX License List used in the license expression. - LicenseListVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseListVersion" iri-compact:"simplelicensing_licenseListVersion"` +func (o *SoftwareAgentList) SoftwareAgentIter() iter.Seq2[AnySoftwareAgent, *SoftwareAgent] { + return typeIter(*o, castSoftwareAgent) } -func NewLicenseExpression() ILicenseExpression { - return &LicenseExpression{} +// Portion of an AnyLicenseInfo representing a set of licensing information +// where all elements apply. +type ExpandedlicensingConjunctiveLicenseSet struct { + SimplelicensingAnyLicenseInfo + + // A license expression participating in a license set. + ExpandedlicensingMembers SimplelicensingAnyLicenseInfoList } -func (o *LicenseExpression) GetSpdxId() string { - return o.SpdxId +func castExpandedlicensingConjunctiveLicenseSet(o any) *ExpandedlicensingConjunctiveLicenseSet { + if o, ok := o.(AnyExpandedlicensingConjunctiveLicenseSet); ok { + return o.asExpandedlicensingConjunctiveLicenseSet() + } + return nil } -func (o *LicenseExpression) SetSpdxId(v string) { - o.SpdxId = v + +func (o *ExpandedlicensingConjunctiveLicenseSet) asExpandedlicensingConjunctiveLicenseSet() *ExpandedlicensingConjunctiveLicenseSet { + return o } -func (o *LicenseExpression) GetComment() string { - return o.Comment + +type AnyExpandedlicensingConjunctiveLicenseSet interface { + AnySimplelicensingAnyLicenseInfo + asExpandedlicensingConjunctiveLicenseSet() *ExpandedlicensingConjunctiveLicenseSet } -func (o *LicenseExpression) SetComment(v string) { - o.Comment = v + +type ExpandedlicensingConjunctiveLicenseSetList []AnyExpandedlicensingConjunctiveLicenseSet + +func (o *ExpandedlicensingConjunctiveLicenseSetList) Append(values ...AnyExpandedlicensingConjunctiveLicenseSet) { + *o = append(*o, values...) } -func (o *LicenseExpression) GetCreationInfo() ICreationInfo { - return o.CreationInfo +func (o *ExpandedlicensingConjunctiveLicenseSetList) Remove(value AnyExpandedlicensingConjunctiveLicenseSet) { + remove(o, value) } -func (o *LicenseExpression) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v + +func (o *ExpandedlicensingConjunctiveLicenseSetList) ExpandedlicensingConjunctiveLicenseSetIter() iter.Seq2[AnyExpandedlicensingConjunctiveLicenseSet, *ExpandedlicensingConjunctiveLicenseSet] { + return typeIter(*o, castExpandedlicensingConjunctiveLicenseSet) } -func (o *LicenseExpression) GetDescription() string { - return o.Description + +// A license addition that is not listed on the SPDX Exceptions List. +type ExpandedlicensingCustomLicenseAddition struct { + ExpandedlicensingLicenseAddition } -func (o *LicenseExpression) SetDescription(v string) { - o.Description = v + +func castExpandedlicensingCustomLicenseAddition(o any) *ExpandedlicensingCustomLicenseAddition { + if o, ok := o.(AnyExpandedlicensingCustomLicenseAddition); ok { + return o.asExpandedlicensingCustomLicenseAddition() + } + return nil } -func (o *LicenseExpression) GetExtensions() []IExtension { - return o.Extensions + +func (o *ExpandedlicensingCustomLicenseAddition) asExpandedlicensingCustomLicenseAddition() *ExpandedlicensingCustomLicenseAddition { + return o } -func (o *LicenseExpression) SetExtensions(v ...IExtension) { - o.Extensions = v + +type AnyExpandedlicensingCustomLicenseAddition interface { + AnyExpandedlicensingLicenseAddition + asExpandedlicensingCustomLicenseAddition() *ExpandedlicensingCustomLicenseAddition } -func (o *LicenseExpression) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers + +type ExpandedlicensingCustomLicenseAdditionList []AnyExpandedlicensingCustomLicenseAddition + +func (o *ExpandedlicensingCustomLicenseAdditionList) Append(values ...AnyExpandedlicensingCustomLicenseAddition) { + *o = append(*o, values...) } -func (o *LicenseExpression) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v +func (o *ExpandedlicensingCustomLicenseAdditionList) Remove(value AnyExpandedlicensingCustomLicenseAddition) { + remove(o, value) } -func (o *LicenseExpression) GetExternalRefs() []IExternalRef { - return o.ExternalRefs + +func (o *ExpandedlicensingCustomLicenseAdditionList) ExpandedlicensingCustomLicenseAdditionIter() iter.Seq2[AnyExpandedlicensingCustomLicenseAddition, *ExpandedlicensingCustomLicenseAddition] { + return typeIter(*o, castExpandedlicensingCustomLicenseAddition) } -func (o *LicenseExpression) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v + +// Portion of an AnyLicenseInfo representing a set of licensing information where +// only one of the elements applies. +type ExpandedlicensingDisjunctiveLicenseSet struct { + SimplelicensingAnyLicenseInfo + + // A license expression participating in a license set. + ExpandedlicensingMembers SimplelicensingAnyLicenseInfoList } -func (o *LicenseExpression) GetName() string { - return o.Name + +func castExpandedlicensingDisjunctiveLicenseSet(o any) *ExpandedlicensingDisjunctiveLicenseSet { + if o, ok := o.(AnyExpandedlicensingDisjunctiveLicenseSet); ok { + return o.asExpandedlicensingDisjunctiveLicenseSet() + } + return nil } -func (o *LicenseExpression) SetName(v string) { - o.Name = v + +func (o *ExpandedlicensingDisjunctiveLicenseSet) asExpandedlicensingDisjunctiveLicenseSet() *ExpandedlicensingDisjunctiveLicenseSet { + return o } -func (o *LicenseExpression) GetSummary() string { - return o.Summary + +type AnyExpandedlicensingDisjunctiveLicenseSet interface { + AnySimplelicensingAnyLicenseInfo + asExpandedlicensingDisjunctiveLicenseSet() *ExpandedlicensingDisjunctiveLicenseSet } -func (o *LicenseExpression) SetSummary(v string) { - o.Summary = v + +type ExpandedlicensingDisjunctiveLicenseSetList []AnyExpandedlicensingDisjunctiveLicenseSet + +func (o *ExpandedlicensingDisjunctiveLicenseSetList) Append(values ...AnyExpandedlicensingDisjunctiveLicenseSet) { + *o = append(*o, values...) } -func (o *LicenseExpression) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing +func (o *ExpandedlicensingDisjunctiveLicenseSetList) Remove(value AnyExpandedlicensingDisjunctiveLicenseSet) { + remove(o, value) } -func (o *LicenseExpression) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v + +func (o *ExpandedlicensingDisjunctiveLicenseSetList) ExpandedlicensingDisjunctiveLicenseSetIter() iter.Seq2[AnyExpandedlicensingDisjunctiveLicenseSet, *ExpandedlicensingDisjunctiveLicenseSet] { + return typeIter(*o, castExpandedlicensingDisjunctiveLicenseSet) } -func (o *LicenseExpression) GetCustomIdToUri() []IDictionaryEntry { - return o.CustomIdToUri +// Abstract class representing a License or an OrLaterOperator. +type ExpandedlicensingExtendableLicense struct { + SimplelicensingAnyLicenseInfo } -func (o *LicenseExpression) SetCustomIdToUri(v ...IDictionaryEntry) { - o.CustomIdToUri = v + +func castExpandedlicensingExtendableLicense(o any) *ExpandedlicensingExtendableLicense { + if o, ok := o.(AnyExpandedlicensingExtendableLicense); ok { + return o.asExpandedlicensingExtendableLicense() + } + return nil } -func (o *LicenseExpression) GetLicenseExpression() string { - return o.LicenseExpression + +func (o *ExpandedlicensingExtendableLicense) asExpandedlicensingExtendableLicense() *ExpandedlicensingExtendableLicense { + return o } -func (o *LicenseExpression) SetLicenseExpression(v string) { - o.LicenseExpression = v + +type AnyExpandedlicensingExtendableLicense interface { + AnySimplelicensingAnyLicenseInfo + asExpandedlicensingExtendableLicense() *ExpandedlicensingExtendableLicense } -func (o *LicenseExpression) GetLicenseListVersion() string { - return o.LicenseListVersion + +type ExpandedlicensingExtendableLicenseList []AnyExpandedlicensingExtendableLicense + +func (o *ExpandedlicensingExtendableLicenseList) Append(values ...AnyExpandedlicensingExtendableLicense) { + *o = append(*o, values...) } -func (o *LicenseExpression) SetLicenseListVersion(v string) { - o.LicenseListVersion = v +func (o *ExpandedlicensingExtendableLicenseList) Remove(value AnyExpandedlicensingExtendableLicense) { + remove(o, value) } -type ISimpleLicensingText interface { - IElement - - // GetLicenseText identifies the full text of a License or Addition. - GetLicenseText() string +func (o *ExpandedlicensingExtendableLicenseList) ExpandedlicensingExtendableLicenseIter() iter.Seq2[AnyExpandedlicensingExtendableLicense, *ExpandedlicensingExtendableLicense] { + return typeIter(*o, castExpandedlicensingExtendableLicense) +} +func (o *ExpandedlicensingExtendableLicenseList) ExpandedlicensingLicenseIter() iter.Seq2[AnyExpandedlicensingExtendableLicense, *ExpandedlicensingLicense] { + return typeIter(*o, castExpandedlicensingLicense) +} +func (o *ExpandedlicensingExtendableLicenseList) ExpandedlicensingListedLicenseIter() iter.Seq2[AnyExpandedlicensingExtendableLicense, *ExpandedlicensingListedLicense] { + return typeIter(*o, castExpandedlicensingListedLicense) +} +func (o *ExpandedlicensingExtendableLicenseList) ExpandedlicensingOrLaterOperatorIter() iter.Seq2[AnyExpandedlicensingExtendableLicense, *ExpandedlicensingOrLaterOperator] { + return typeIter(*o, castExpandedlicensingOrLaterOperator) +} +func (o *ExpandedlicensingExtendableLicenseList) ExpandedlicensingCustomLicenseIter() iter.Seq2[AnyExpandedlicensingExtendableLicense, *ExpandedlicensingCustomLicense] { + return typeIter(*o, castExpandedlicensingCustomLicense) +} - SetLicenseText(string) +// A concrete subclass of AnyLicenseInfo used by Individuals in the +// ExpandedLicensing profile. +type ExpandedlicensingIndividualLicensingInfo struct { + SimplelicensingAnyLicenseInfo } -type SimpleLicensingText struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/SimpleLicensingText" iri-compact:"simplelicensing_SimpleLicensingText" id-prop:"spdxId"` +// An Individual Value for License when no assertion can be made about its actual +// value. +var ExpandedlicensingIndividualLicensingInfo_NoAssertionLicense = ExpandedlicensingIndividualLicensingInfo{SimplelicensingAnyLicenseInfo: SimplelicensingAnyLicenseInfo{Element: Element{ID: "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/NoAssertionLicense"}}} - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +// An Individual Value for License where the SPDX data creator determines that no +// license is present. +var ExpandedlicensingIndividualLicensingInfo_NoneLicense = ExpandedlicensingIndividualLicensingInfo{SimplelicensingAnyLicenseInfo: SimplelicensingAnyLicenseInfo{Element: Element{ID: "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/NoneLicense"}}} - // LicenseText identifies the full text of a License or Addition. - LicenseText string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` +func castExpandedlicensingIndividualLicensingInfo(o any) *ExpandedlicensingIndividualLicensingInfo { + if o, ok := o.(AnyExpandedlicensingIndividualLicensingInfo); ok { + return o.asExpandedlicensingIndividualLicensingInfo() + } + return nil } -func NewSimpleLicensingText() ISimpleLicensingText { - return &SimpleLicensingText{} +func (o *ExpandedlicensingIndividualLicensingInfo) asExpandedlicensingIndividualLicensingInfo() *ExpandedlicensingIndividualLicensingInfo { + return o } -func (o *SimpleLicensingText) GetSpdxId() string { - return o.SpdxId +type AnyExpandedlicensingIndividualLicensingInfo interface { + AnySimplelicensingAnyLicenseInfo + asExpandedlicensingIndividualLicensingInfo() *ExpandedlicensingIndividualLicensingInfo } -func (o *SimpleLicensingText) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *SimpleLicensingText) GetComment() string { - return o.Comment -} -func (o *SimpleLicensingText) SetComment(v string) { - o.Comment = v + +type ExpandedlicensingIndividualLicensingInfoList []AnyExpandedlicensingIndividualLicensingInfo + +func (o *ExpandedlicensingIndividualLicensingInfoList) Append(values ...AnyExpandedlicensingIndividualLicensingInfo) { + *o = append(*o, values...) } -func (o *SimpleLicensingText) GetCreationInfo() ICreationInfo { - return o.CreationInfo +func (o *ExpandedlicensingIndividualLicensingInfoList) Remove(value AnyExpandedlicensingIndividualLicensingInfo) { + remove(o, value) } -func (o *SimpleLicensingText) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v + +func (o *ExpandedlicensingIndividualLicensingInfoList) ExpandedlicensingIndividualLicensingInfoIter() iter.Seq2[AnyExpandedlicensingIndividualLicensingInfo, *ExpandedlicensingIndividualLicensingInfo] { + return typeIter(*o, castExpandedlicensingIndividualLicensingInfo) } -func (o *SimpleLicensingText) GetDescription() string { - return o.Description + +// Abstract class for the portion of an AnyLicenseInfo representing a license. +type ExpandedlicensingLicense struct { + ExpandedlicensingExtendableLicense + + // Specifies whether a license or additional text identifier has been marked as + // deprecated. + ExpandedlicensingIsDeprecatedLicenseId bool + // Specifies whether the License is listed as free by the + // Free Software Foundation (FSF). + ExpandedlicensingIsFsfLibre bool + // Specifies whether the License is listed as approved by the + // Open Source Initiative (OSI). + ExpandedlicensingIsOsiApproved bool + // Identifies all the text and metadata associated with a license in the license + // XML format. + ExpandedlicensingLicenseXml string + // Specifies the licenseId that is preferred to be used in place of a deprecated + // License or LicenseAddition. + ExpandedlicensingObsoletedBy string + // Contains a URL where the License or LicenseAddition can be found in use. + ExpandedlicensingSeeAlsos []string + // Provides a License author's preferred text to indicate that a file is covered + // by the License. + ExpandedlicensingStandardLicenseHeader string + // Identifies the full text of a License, in SPDX templating format. + ExpandedlicensingStandardLicenseTemplate string + // Identifies the full text of a License or Addition. + SimplelicensingLicenseText string } -func (o *SimpleLicensingText) SetDescription(v string) { - o.Description = v + +func castExpandedlicensingLicense(o any) *ExpandedlicensingLicense { + if o, ok := o.(AnyExpandedlicensingLicense); ok { + return o.asExpandedlicensingLicense() + } + return nil } -func (o *SimpleLicensingText) GetExtensions() []IExtension { - return o.Extensions + +func (o *ExpandedlicensingLicense) asExpandedlicensingLicense() *ExpandedlicensingLicense { + return o } -func (o *SimpleLicensingText) SetExtensions(v ...IExtension) { - o.Extensions = v + +type AnyExpandedlicensingLicense interface { + AnyExpandedlicensingExtendableLicense + asExpandedlicensingLicense() *ExpandedlicensingLicense } -func (o *SimpleLicensingText) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers + +type ExpandedlicensingLicenseList []AnyExpandedlicensingLicense + +func (o *ExpandedlicensingLicenseList) Append(values ...AnyExpandedlicensingLicense) { + *o = append(*o, values...) } -func (o *SimpleLicensingText) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v +func (o *ExpandedlicensingLicenseList) Remove(value AnyExpandedlicensingLicense) { remove(o, value) } + +func (o *ExpandedlicensingLicenseList) ExpandedlicensingLicenseIter() iter.Seq2[AnyExpandedlicensingLicense, *ExpandedlicensingLicense] { + return typeIter(*o, castExpandedlicensingLicense) } -func (o *SimpleLicensingText) GetExternalRefs() []IExternalRef { - return o.ExternalRefs +func (o *ExpandedlicensingLicenseList) ExpandedlicensingListedLicenseIter() iter.Seq2[AnyExpandedlicensingLicense, *ExpandedlicensingListedLicense] { + return typeIter(*o, castExpandedlicensingListedLicense) } -func (o *SimpleLicensingText) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v +func (o *ExpandedlicensingLicenseList) ExpandedlicensingCustomLicenseIter() iter.Seq2[AnyExpandedlicensingLicense, *ExpandedlicensingCustomLicense] { + return typeIter(*o, castExpandedlicensingCustomLicense) } -func (o *SimpleLicensingText) GetName() string { - return o.Name + +// A license that is listed on the SPDX License List. +type ExpandedlicensingListedLicense struct { + ExpandedlicensingLicense + + // Specifies the SPDX License List version in which this license or exception + // identifier was deprecated. + ExpandedlicensingDeprecatedVersion string + // Specifies the SPDX License List version in which this ListedLicense or + // ListedLicenseException identifier was first added. + ExpandedlicensingListVersionAdded string } -func (o *SimpleLicensingText) SetName(v string) { - o.Name = v + +func castExpandedlicensingListedLicense(o any) *ExpandedlicensingListedLicense { + if o, ok := o.(AnyExpandedlicensingListedLicense); ok { + return o.asExpandedlicensingListedLicense() + } + return nil } -func (o *SimpleLicensingText) GetSummary() string { - return o.Summary + +func (o *ExpandedlicensingListedLicense) asExpandedlicensingListedLicense() *ExpandedlicensingListedLicense { + return o } -func (o *SimpleLicensingText) SetSummary(v string) { - o.Summary = v + +type AnyExpandedlicensingListedLicense interface { + AnyExpandedlicensingLicense + asExpandedlicensingListedLicense() *ExpandedlicensingListedLicense } -func (o *SimpleLicensingText) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing + +type ExpandedlicensingListedLicenseList []AnyExpandedlicensingListedLicense + +func (o *ExpandedlicensingListedLicenseList) Append(values ...AnyExpandedlicensingListedLicense) { + *o = append(*o, values...) } -func (o *SimpleLicensingText) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v +func (o *ExpandedlicensingListedLicenseList) Remove(value AnyExpandedlicensingListedLicense) { + remove(o, value) } -func (o *SimpleLicensingText) GetLicenseText() string { - return o.LicenseText +func (o *ExpandedlicensingListedLicenseList) ExpandedlicensingListedLicenseIter() iter.Seq2[AnyExpandedlicensingListedLicense, *ExpandedlicensingListedLicense] { + return typeIter(*o, castExpandedlicensingListedLicense) } -func (o *SimpleLicensingText) SetLicenseText(v string) { - o.LicenseText = v + +// Portion of an AnyLicenseInfo representing this version, or any later version, +// of the indicated License. +type ExpandedlicensingOrLaterOperator struct { + ExpandedlicensingExtendableLicense + + // A License participating in an 'or later' model. + ExpandedlicensingSubjectLicense AnyExpandedlicensingLicense } -type IContentIdentifier interface { - IIntegrityMethod +func castExpandedlicensingOrLaterOperator(o any) *ExpandedlicensingOrLaterOperator { + if o, ok := o.(AnyExpandedlicensingOrLaterOperator); ok { + return o.asExpandedlicensingOrLaterOperator() + } + return nil +} - // GetContentIdentifierType specifies the type of the content identifier. - GetContentIdentifierType() ContentIdentifierType +func (o *ExpandedlicensingOrLaterOperator) asExpandedlicensingOrLaterOperator() *ExpandedlicensingOrLaterOperator { + return o +} - SetContentIdentifierType(ContentIdentifierType) +type AnyExpandedlicensingOrLaterOperator interface { + AnyExpandedlicensingExtendableLicense + asExpandedlicensingOrLaterOperator() *ExpandedlicensingOrLaterOperator +} - // GetContentIdentifierValue specifies the value of the content identifier. - GetContentIdentifierValue() string +type ExpandedlicensingOrLaterOperatorList []AnyExpandedlicensingOrLaterOperator - SetContentIdentifierValue(string) +func (o *ExpandedlicensingOrLaterOperatorList) Append(values ...AnyExpandedlicensingOrLaterOperator) { + *o = append(*o, values...) +} +func (o *ExpandedlicensingOrLaterOperatorList) Remove(value AnyExpandedlicensingOrLaterOperator) { + remove(o, value) } -type ContentIdentifier struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifier" iri-compact:"software_ContentIdentifier"` +func (o *ExpandedlicensingOrLaterOperatorList) ExpandedlicensingOrLaterOperatorIter() iter.Seq2[AnyExpandedlicensingOrLaterOperator, *ExpandedlicensingOrLaterOperator] { + return typeIter(*o, castExpandedlicensingOrLaterOperator) +} - Iri string `iri:"@id"` +// Portion of an AnyLicenseInfo representing a License which has additional +// text applied to it. +type ExpandedlicensingWithAdditionOperator struct { + SimplelicensingAnyLicenseInfo - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` + // A LicenseAddition participating in a 'with addition' model. + ExpandedlicensingSubjectAddition AnyExpandedlicensingLicenseAddition - // ContentIdentifierType specifies the type of the content identifier. - ContentIdentifierType ContentIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifierType" iri-compact:"software_contentIdentifierType"` - // ContentIdentifierValue specifies the value of the content identifier. - ContentIdentifierValue string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifierValue" iri-compact:"software_contentIdentifierValue"` + // A License participating in a 'with addition' model. + ExpandedlicensingSubjectExtendableLicense AnyExpandedlicensingExtendableLicense } -func NewContentIdentifier() IContentIdentifier { - return &ContentIdentifier{} +func castExpandedlicensingWithAdditionOperator(o any) *ExpandedlicensingWithAdditionOperator { + if o, ok := o.(AnyExpandedlicensingWithAdditionOperator); ok { + return o.asExpandedlicensingWithAdditionOperator() + } + return nil } -func (o *ContentIdentifier) GetComment() string { - return o.Comment -} -func (o *ContentIdentifier) SetComment(v string) { - o.Comment = v +func (o *ExpandedlicensingWithAdditionOperator) asExpandedlicensingWithAdditionOperator() *ExpandedlicensingWithAdditionOperator { + return o } -func (o *ContentIdentifier) GetContentIdentifierType() ContentIdentifierType { - return o.ContentIdentifierType +type AnyExpandedlicensingWithAdditionOperator interface { + AnySimplelicensingAnyLicenseInfo + asExpandedlicensingWithAdditionOperator() *ExpandedlicensingWithAdditionOperator } -func (o *ContentIdentifier) SetContentIdentifierType(v ContentIdentifierType) { - o.ContentIdentifierType = v + +type ExpandedlicensingWithAdditionOperatorList []AnyExpandedlicensingWithAdditionOperator + +func (o *ExpandedlicensingWithAdditionOperatorList) Append(values ...AnyExpandedlicensingWithAdditionOperator) { + *o = append(*o, values...) } -func (o *ContentIdentifier) GetContentIdentifierValue() string { - return o.ContentIdentifierValue +func (o *ExpandedlicensingWithAdditionOperatorList) Remove(value AnyExpandedlicensingWithAdditionOperator) { + remove(o, value) } -func (o *ContentIdentifier) SetContentIdentifierValue(v string) { - o.ContentIdentifierValue = v + +func (o *ExpandedlicensingWithAdditionOperatorList) ExpandedlicensingWithAdditionOperatorIter() iter.Seq2[AnyExpandedlicensingWithAdditionOperator, *ExpandedlicensingWithAdditionOperator] { + return typeIter(*o, castExpandedlicensingWithAdditionOperator) } -type ContentIdentifierType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifierType" iri-compact:"software_ContentIdentifierType"` +// A type of extension consisting of a list of name value pairs. +type ExtensionCdxPropertiesExtension struct { + ExtensionExtension - Iri string `iri:"@id"` + // Provides a map of a property names to a values. + ExtensionCdxPropertys ExtensionCdxPropertyEntryList } -var ( - ContentIdentifierType_Gitoid = ContentIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifierType/gitoid"} - ContentIdentifierType_Swhid = ContentIdentifierType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifierType/swhid"} -) +func castExtensionCdxPropertiesExtension(o any) *ExtensionCdxPropertiesExtension { + if o, ok := o.(AnyExtensionCdxPropertiesExtension); ok { + return o.asExtensionCdxPropertiesExtension() + } + return nil +} -type FileKindType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/FileKindType" iri-compact:"software_FileKindType"` +func (o *ExtensionCdxPropertiesExtension) asExtensionCdxPropertiesExtension() *ExtensionCdxPropertiesExtension { + return o +} - Iri string `iri:"@id"` +type AnyExtensionCdxPropertiesExtension interface { + AnyExtensionExtension + asExtensionCdxPropertiesExtension() *ExtensionCdxPropertiesExtension } -var ( - FileKindType_Directory = FileKindType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/FileKindType/directory"} - FileKindType_File = FileKindType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/FileKindType/file"} -) +type ExtensionCdxPropertiesExtensionList []AnyExtensionCdxPropertiesExtension -type SbomType struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/SbomType" iri-compact:"software_SbomType"` +func (o *ExtensionCdxPropertiesExtensionList) Append(values ...AnyExtensionCdxPropertiesExtension) { + *o = append(*o, values...) +} +func (o *ExtensionCdxPropertiesExtensionList) Remove(value AnyExtensionCdxPropertiesExtension) { + remove(o, value) +} - Iri string `iri:"@id"` +func (o *ExtensionCdxPropertiesExtensionList) ExtensionCdxPropertiesExtensionIter() iter.Seq2[AnyExtensionCdxPropertiesExtension, *ExtensionCdxPropertiesExtension] { + return typeIter(*o, castExtensionCdxPropertiesExtension) } -var ( - SbomType_Analyzed = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/analyzed"} - SbomType_Build = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/build"} - SbomType_Deployed = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/deployed"} - SbomType_Design = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/design"} - SbomType_Runtime = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/runtime"} - SbomType_Source = SbomType{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/source"} -) +// Provides a CVSS version 2.0 assessment for a vulnerability. +type SecurityCvssV2VulnAssessmentRelationship struct { + SecurityVulnAssessmentRelationship -type SoftwarePurpose struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose" iri-compact:"software_SoftwarePurpose"` - - Iri string `iri:"@id"` -} - -var ( - SoftwarePurpose_Application = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/application"} - SoftwarePurpose_Archive = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/archive"} - SoftwarePurpose_Bom = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/bom"} - SoftwarePurpose_Configuration = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/configuration"} - SoftwarePurpose_Container = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/container"} - SoftwarePurpose_Data = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/data"} - SoftwarePurpose_Device = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/device"} - SoftwarePurpose_DeviceDriver = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/deviceDriver"} - SoftwarePurpose_DiskImage = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/diskImage"} - SoftwarePurpose_Documentation = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/documentation"} - SoftwarePurpose_Evidence = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/evidence"} - SoftwarePurpose_Executable = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/executable"} - SoftwarePurpose_File = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/file"} - SoftwarePurpose_FilesystemImage = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/filesystemImage"} - SoftwarePurpose_Firmware = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/firmware"} - SoftwarePurpose_Framework = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/framework"} - SoftwarePurpose_Install = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/install"} - SoftwarePurpose_Library = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/library"} - SoftwarePurpose_Manifest = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/manifest"} - SoftwarePurpose_Model = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/model"} - SoftwarePurpose_Module = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/module"} - SoftwarePurpose_OperatingSystem = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/operatingSystem"} - SoftwarePurpose_Other = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/other"} - SoftwarePurpose_Patch = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/patch"} - SoftwarePurpose_Platform = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/platform"} - SoftwarePurpose_Requirement = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/requirement"} - SoftwarePurpose_Source = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/source"} - SoftwarePurpose_Specification = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/specification"} - SoftwarePurpose_Test = SoftwarePurpose{Iri: "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/test"} -) + // Provides a numerical (0-10) representation of the severity of a vulnerability. + SecurityScore float64 + // Specifies the CVSS vector string for a vulnerability. + SecurityVectorString string +} -type IBuild interface { - IElement +func castSecurityCvssV2VulnAssessmentRelationship(o any) *SecurityCvssV2VulnAssessmentRelationship { + if o, ok := o.(AnySecurityCvssV2VulnAssessmentRelationship); ok { + return o.asSecurityCvssV2VulnAssessmentRelationship() + } + return nil +} - // GetBuildEndTime property that describes the time at which a build stops. - GetBuildEndTime() string +func (o *SecurityCvssV2VulnAssessmentRelationship) asSecurityCvssV2VulnAssessmentRelationship() *SecurityCvssV2VulnAssessmentRelationship { + return o +} - SetBuildEndTime(string) +type AnySecurityCvssV2VulnAssessmentRelationship interface { + AnySecurityVulnAssessmentRelationship + asSecurityCvssV2VulnAssessmentRelationship() *SecurityCvssV2VulnAssessmentRelationship +} - // GetBuildId a buildId is a locally unique identifier used by a builder to identify a unique - // instance of a build produced by it. - GetBuildId() string +type SecurityCvssV2VulnAssessmentRelationshipList []AnySecurityCvssV2VulnAssessmentRelationship - SetBuildId(string) +func (o *SecurityCvssV2VulnAssessmentRelationshipList) Append(values ...AnySecurityCvssV2VulnAssessmentRelationship) { + *o = append(*o, values...) +} +func (o *SecurityCvssV2VulnAssessmentRelationshipList) Remove(value AnySecurityCvssV2VulnAssessmentRelationship) { + remove(o, value) +} - // GetBuildStartTime property describing the start time of a build. - GetBuildStartTime() string +func (o *SecurityCvssV2VulnAssessmentRelationshipList) SecurityCvssV2VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityCvssV2VulnAssessmentRelationship, *SecurityCvssV2VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV2VulnAssessmentRelationship) +} - SetBuildStartTime(string) +// Provides a CVSS version 3 assessment for a vulnerability. +type SecurityCvssV3VulnAssessmentRelationship struct { + SecurityVulnAssessmentRelationship - // GetBuildType a buildType is a hint that is used to indicate the toolchain, platform, or - // infrastructure that the build was invoked on. - GetBuildType() string + // Provides a numerical (0-10) representation of the severity of a vulnerability. + SecurityScore float64 + // Specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. + SecuritySeverity SecurityCvssSeverityType + // Specifies the CVSS vector string for a vulnerability. + SecurityVectorString string +} - SetBuildType(string) +func castSecurityCvssV3VulnAssessmentRelationship(o any) *SecurityCvssV3VulnAssessmentRelationship { + if o, ok := o.(AnySecurityCvssV3VulnAssessmentRelationship); ok { + return o.asSecurityCvssV3VulnAssessmentRelationship() + } + return nil +} - // GetConfigSourceDigest property that describes the digest of the build configuration file used to - // invoke a build. - GetConfigSourceDigest() []IHash +func (o *SecurityCvssV3VulnAssessmentRelationship) asSecurityCvssV3VulnAssessmentRelationship() *SecurityCvssV3VulnAssessmentRelationship { + return o +} - SetConfigSourceDigest(...IHash) +type AnySecurityCvssV3VulnAssessmentRelationship interface { + AnySecurityVulnAssessmentRelationship + asSecurityCvssV3VulnAssessmentRelationship() *SecurityCvssV3VulnAssessmentRelationship +} - // GetConfigSourceEntrypoint property describes the invocation entrypoint of a build. - GetConfigSourceEntrypoint() []string +type SecurityCvssV3VulnAssessmentRelationshipList []AnySecurityCvssV3VulnAssessmentRelationship - SetConfigSourceEntrypoint(...string) +func (o *SecurityCvssV3VulnAssessmentRelationshipList) Append(values ...AnySecurityCvssV3VulnAssessmentRelationship) { + *o = append(*o, values...) +} +func (o *SecurityCvssV3VulnAssessmentRelationshipList) Remove(value AnySecurityCvssV3VulnAssessmentRelationship) { + remove(o, value) +} - // GetConfigSourceUri property that describes the URI of the build configuration source file. - GetConfigSourceUri() []string +func (o *SecurityCvssV3VulnAssessmentRelationshipList) SecurityCvssV3VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityCvssV3VulnAssessmentRelationship, *SecurityCvssV3VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV3VulnAssessmentRelationship) +} - SetConfigSourceUri(...string) +// Provides a CVSS version 4 assessment for a vulnerability. +type SecurityCvssV4VulnAssessmentRelationship struct { + SecurityVulnAssessmentRelationship - // GetEnvironment property describing the session in which a build is invoked. - GetEnvironment() []IDictionaryEntry + // Provides a numerical (0-10) representation of the severity of a vulnerability. + SecurityScore float64 + // Specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. + SecuritySeverity SecurityCvssSeverityType + // Specifies the CVSS vector string for a vulnerability. + SecurityVectorString string +} - SetEnvironment(...IDictionaryEntry) +func castSecurityCvssV4VulnAssessmentRelationship(o any) *SecurityCvssV4VulnAssessmentRelationship { + if o, ok := o.(AnySecurityCvssV4VulnAssessmentRelationship); ok { + return o.asSecurityCvssV4VulnAssessmentRelationship() + } + return nil +} - // GetParameters property describing the parameters used in an instance of a build. - GetParameters() []IDictionaryEntry +func (o *SecurityCvssV4VulnAssessmentRelationship) asSecurityCvssV4VulnAssessmentRelationship() *SecurityCvssV4VulnAssessmentRelationship { + return o +} - SetParameters(...IDictionaryEntry) +type AnySecurityCvssV4VulnAssessmentRelationship interface { + AnySecurityVulnAssessmentRelationship + asSecurityCvssV4VulnAssessmentRelationship() *SecurityCvssV4VulnAssessmentRelationship } -type Build struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Build/Build" iri-compact:"build_Build" id-prop:"spdxId"` +type SecurityCvssV4VulnAssessmentRelationshipList []AnySecurityCvssV4VulnAssessmentRelationship - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // BuildEndTime property that describes the time at which a build stops. - BuildEndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/buildEndTime" iri-compact:"build_buildEndTime"` - // BuildId a buildId is a locally unique identifier used by a builder to identify a unique - // instance of a build produced by it. - BuildId string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/buildId" iri-compact:"build_buildId"` - // BuildStartTime property describing the start time of a build. - BuildStartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/buildStartTime" iri-compact:"build_buildStartTime"` - // BuildType a buildType is a hint that is used to indicate the toolchain, platform, or - // infrastructure that the build was invoked on. - BuildType string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/buildType" iri-compact:"build_buildType"` - // ConfigSourceDigest property that describes the digest of the build configuration file used to - // invoke a build. - ConfigSourceDigest []IHash `iri:"https://spdx.org/rdf/3.0.0/terms/Build/configSourceDigest" iri-compact:"build_configSourceDigest"` - // ConfigSourceEntrypoint property describes the invocation entrypoint of a build. - ConfigSourceEntrypoint []string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/configSourceEntrypoint" iri-compact:"build_configSourceEntrypoint"` - // ConfigSourceUri property that describes the URI of the build configuration source file. - ConfigSourceUri []string `iri:"https://spdx.org/rdf/3.0.0/terms/Build/configSourceUri" iri-compact:"build_configSourceUri"` - // Environment property describing the session in which a build is invoked. - Environment []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/Build/environment" iri-compact:"build_environment"` - // Parameters property describing the parameters used in an instance of a build. - Parameters []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/Build/parameters" iri-compact:"build_parameters"` +func (o *SecurityCvssV4VulnAssessmentRelationshipList) Append(values ...AnySecurityCvssV4VulnAssessmentRelationship) { + *o = append(*o, values...) } - -func NewBuild() IBuild { - return &Build{} +func (o *SecurityCvssV4VulnAssessmentRelationshipList) Remove(value AnySecurityCvssV4VulnAssessmentRelationship) { + remove(o, value) } -func (o *Build) GetSpdxId() string { - return o.SpdxId -} -func (o *Build) SetSpdxId(v string) { - o.SpdxId = v +func (o *SecurityCvssV4VulnAssessmentRelationshipList) SecurityCvssV4VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityCvssV4VulnAssessmentRelationship, *SecurityCvssV4VulnAssessmentRelationship] { + return typeIter(*o, castSecurityCvssV4VulnAssessmentRelationship) } -func (o *Build) GetComment() string { - return o.Comment -} -func (o *Build) SetComment(v string) { - o.Comment = v + +// Provides an EPSS assessment for a vulnerability. +type SecurityEpssVulnAssessmentRelationship struct { + SecurityVulnAssessmentRelationship + + // The percentile of the current probability score. + SecurityPercentile float64 + // A probability score between 0 and 1 of a vulnerability being exploited. + SecurityProbability float64 } -func (o *Build) GetCreationInfo() ICreationInfo { - return o.CreationInfo + +func castSecurityEpssVulnAssessmentRelationship(o any) *SecurityEpssVulnAssessmentRelationship { + if o, ok := o.(AnySecurityEpssVulnAssessmentRelationship); ok { + return o.asSecurityEpssVulnAssessmentRelationship() + } + return nil } -func (o *Build) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v + +func (o *SecurityEpssVulnAssessmentRelationship) asSecurityEpssVulnAssessmentRelationship() *SecurityEpssVulnAssessmentRelationship { + return o } -func (o *Build) GetDescription() string { - return o.Description + +type AnySecurityEpssVulnAssessmentRelationship interface { + AnySecurityVulnAssessmentRelationship + asSecurityEpssVulnAssessmentRelationship() *SecurityEpssVulnAssessmentRelationship } -func (o *Build) SetDescription(v string) { - o.Description = v + +type SecurityEpssVulnAssessmentRelationshipList []AnySecurityEpssVulnAssessmentRelationship + +func (o *SecurityEpssVulnAssessmentRelationshipList) Append(values ...AnySecurityEpssVulnAssessmentRelationship) { + *o = append(*o, values...) } -func (o *Build) GetExtensions() []IExtension { - return o.Extensions +func (o *SecurityEpssVulnAssessmentRelationshipList) Remove(value AnySecurityEpssVulnAssessmentRelationship) { + remove(o, value) } -func (o *Build) SetExtensions(v ...IExtension) { - o.Extensions = v + +func (o *SecurityEpssVulnAssessmentRelationshipList) SecurityEpssVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityEpssVulnAssessmentRelationship, *SecurityEpssVulnAssessmentRelationship] { + return typeIter(*o, castSecurityEpssVulnAssessmentRelationship) } -func (o *Build) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers + +// Provides an exploit assessment of a vulnerability. +type SecurityExploitCatalogVulnAssessmentRelationship struct { + SecurityVulnAssessmentRelationship + + // Specifies the exploit catalog type. + SecurityCatalogType SecurityExploitCatalogType + // Describe that a CVE is known to have an exploit because it's been listed in an exploit catalog. + SecurityExploited bool + // Provides the location of an exploit catalog. + SecurityLocator string } -func (o *Build) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v + +func castSecurityExploitCatalogVulnAssessmentRelationship(o any) *SecurityExploitCatalogVulnAssessmentRelationship { + if o, ok := o.(AnySecurityExploitCatalogVulnAssessmentRelationship); ok { + return o.asSecurityExploitCatalogVulnAssessmentRelationship() + } + return nil } -func (o *Build) GetExternalRefs() []IExternalRef { - return o.ExternalRefs + +func (o *SecurityExploitCatalogVulnAssessmentRelationship) asSecurityExploitCatalogVulnAssessmentRelationship() *SecurityExploitCatalogVulnAssessmentRelationship { + return o } -func (o *Build) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v + +type AnySecurityExploitCatalogVulnAssessmentRelationship interface { + AnySecurityVulnAssessmentRelationship + asSecurityExploitCatalogVulnAssessmentRelationship() *SecurityExploitCatalogVulnAssessmentRelationship } -func (o *Build) GetName() string { - return o.Name + +type SecurityExploitCatalogVulnAssessmentRelationshipList []AnySecurityExploitCatalogVulnAssessmentRelationship + +func (o *SecurityExploitCatalogVulnAssessmentRelationshipList) Append(values ...AnySecurityExploitCatalogVulnAssessmentRelationship) { + *o = append(*o, values...) } -func (o *Build) SetName(v string) { - o.Name = v +func (o *SecurityExploitCatalogVulnAssessmentRelationshipList) Remove(value AnySecurityExploitCatalogVulnAssessmentRelationship) { + remove(o, value) } -func (o *Build) GetSummary() string { - return o.Summary + +func (o *SecurityExploitCatalogVulnAssessmentRelationshipList) SecurityExploitCatalogVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityExploitCatalogVulnAssessmentRelationship, *SecurityExploitCatalogVulnAssessmentRelationship] { + return typeIter(*o, castSecurityExploitCatalogVulnAssessmentRelationship) } -func (o *Build) SetSummary(v string) { - o.Summary = v + +// Provides an SSVC assessment for a vulnerability. +type SecuritySsvcVulnAssessmentRelationship struct { + SecurityVulnAssessmentRelationship + + // Provide the enumeration of possible decisions in the + // [Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree](https://www.cisa.gov/stakeholder-specific-vulnerability-categorization-ssvc). + SecurityDecisionType SecuritySsvcDecisionType } -func (o *Build) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing + +func castSecuritySsvcVulnAssessmentRelationship(o any) *SecuritySsvcVulnAssessmentRelationship { + if o, ok := o.(AnySecuritySsvcVulnAssessmentRelationship); ok { + return o.asSecuritySsvcVulnAssessmentRelationship() + } + return nil } -func (o *Build) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v + +func (o *SecuritySsvcVulnAssessmentRelationship) asSecuritySsvcVulnAssessmentRelationship() *SecuritySsvcVulnAssessmentRelationship { + return o } -func (o *Build) GetBuildEndTime() string { - return o.BuildEndTime +type AnySecuritySsvcVulnAssessmentRelationship interface { + AnySecurityVulnAssessmentRelationship + asSecuritySsvcVulnAssessmentRelationship() *SecuritySsvcVulnAssessmentRelationship } -func (o *Build) SetBuildEndTime(v string) { - o.BuildEndTime = v + +type SecuritySsvcVulnAssessmentRelationshipList []AnySecuritySsvcVulnAssessmentRelationship + +func (o *SecuritySsvcVulnAssessmentRelationshipList) Append(values ...AnySecuritySsvcVulnAssessmentRelationship) { + *o = append(*o, values...) } -func (o *Build) GetBuildId() string { - return o.BuildId +func (o *SecuritySsvcVulnAssessmentRelationshipList) Remove(value AnySecuritySsvcVulnAssessmentRelationship) { + remove(o, value) } -func (o *Build) SetBuildId(v string) { - o.BuildId = v + +func (o *SecuritySsvcVulnAssessmentRelationshipList) SecuritySsvcVulnAssessmentRelationshipIter() iter.Seq2[AnySecuritySsvcVulnAssessmentRelationship, *SecuritySsvcVulnAssessmentRelationship] { + return typeIter(*o, castSecuritySsvcVulnAssessmentRelationship) } -func (o *Build) GetBuildStartTime() string { - return o.BuildStartTime + +// Abstract ancestor class for all VEX relationships +type SecurityVexVulnAssessmentRelationship struct { + SecurityVulnAssessmentRelationship + + // Conveys information about how VEX status was determined. + SecurityStatusNotes string + // Specifies the version of a VEX statement. + SecurityVexVersion string } -func (o *Build) SetBuildStartTime(v string) { - o.BuildStartTime = v + +func castSecurityVexVulnAssessmentRelationship(o any) *SecurityVexVulnAssessmentRelationship { + if o, ok := o.(AnySecurityVexVulnAssessmentRelationship); ok { + return o.asSecurityVexVulnAssessmentRelationship() + } + return nil } -func (o *Build) GetBuildType() string { - return o.BuildType + +func (o *SecurityVexVulnAssessmentRelationship) asSecurityVexVulnAssessmentRelationship() *SecurityVexVulnAssessmentRelationship { + return o } -func (o *Build) SetBuildType(v string) { - o.BuildType = v + +type AnySecurityVexVulnAssessmentRelationship interface { + AnySecurityVulnAssessmentRelationship + asSecurityVexVulnAssessmentRelationship() *SecurityVexVulnAssessmentRelationship } -func (o *Build) GetConfigSourceDigest() []IHash { - return o.ConfigSourceDigest + +type SecurityVexVulnAssessmentRelationshipList []AnySecurityVexVulnAssessmentRelationship + +func (o *SecurityVexVulnAssessmentRelationshipList) Append(values ...AnySecurityVexVulnAssessmentRelationship) { + *o = append(*o, values...) } -func (o *Build) SetConfigSourceDigest(v ...IHash) { - o.ConfigSourceDigest = v +func (o *SecurityVexVulnAssessmentRelationshipList) Remove(value AnySecurityVexVulnAssessmentRelationship) { + remove(o, value) } -func (o *Build) GetConfigSourceEntrypoint() []string { - return o.ConfigSourceEntrypoint + +func (o *SecurityVexVulnAssessmentRelationshipList) SecurityVexVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexVulnAssessmentRelationship, *SecurityVexVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexVulnAssessmentRelationship) } -func (o *Build) SetConfigSourceEntrypoint(v ...string) { - o.ConfigSourceEntrypoint = v +func (o *SecurityVexVulnAssessmentRelationshipList) SecurityVexAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexVulnAssessmentRelationship, *SecurityVexAffectedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexAffectedVulnAssessmentRelationship) } -func (o *Build) GetConfigSourceUri() []string { - return o.ConfigSourceUri +func (o *SecurityVexVulnAssessmentRelationshipList) SecurityVexFixedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexVulnAssessmentRelationship, *SecurityVexFixedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexFixedVulnAssessmentRelationship) } -func (o *Build) SetConfigSourceUri(v ...string) { - o.ConfigSourceUri = v +func (o *SecurityVexVulnAssessmentRelationshipList) SecurityVexNotAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexVulnAssessmentRelationship, *SecurityVexNotAffectedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexNotAffectedVulnAssessmentRelationship) } -func (o *Build) GetEnvironment() []IDictionaryEntry { - return o.Environment +func (o *SecurityVexVulnAssessmentRelationshipList) SecurityVexUnderInvestigationVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexVulnAssessmentRelationship, *SecurityVexUnderInvestigationVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexUnderInvestigationVulnAssessmentRelationship) } -func (o *Build) SetEnvironment(v ...IDictionaryEntry) { - o.Environment = v + +// Specifies a vulnerability and its associated information. +type SecurityVulnerability struct { + Artifact + + // Specifies a time when a vulnerability assessment was modified + SecurityModifiedTime time.Time + // Specifies the time when a vulnerability was published. + SecurityPublishedTime time.Time + // Specified the time and date when a vulnerability was withdrawn. + SecurityWithdrawnTime time.Time } -func (o *Build) GetParameters() []IDictionaryEntry { - return o.Parameters + +func castSecurityVulnerability(o any) *SecurityVulnerability { + if o, ok := o.(AnySecurityVulnerability); ok { + return o.asSecurityVulnerability() + } + return nil } -func (o *Build) SetParameters(v ...IDictionaryEntry) { - o.Parameters = v + +func (o *SecurityVulnerability) asSecurityVulnerability() *SecurityVulnerability { + return o } -type IAgent interface { - IElement +type AnySecurityVulnerability interface { + AnyArtifact + asSecurityVulnerability() *SecurityVulnerability } -type Agent struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Agent" iri-compact:"Agent" id-prop:"spdxId"` +type SecurityVulnerabilityList []AnySecurityVulnerability - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +func (o *SecurityVulnerabilityList) Append(values ...AnySecurityVulnerability) { + *o = append(*o, values...) } +func (o *SecurityVulnerabilityList) Remove(value AnySecurityVulnerability) { remove(o, value) } -func NewAgent() IAgent { - return &Agent{} +func (o *SecurityVulnerabilityList) SecurityVulnerabilityIter() iter.Seq2[AnySecurityVulnerability, *SecurityVulnerability] { + return typeIter(*o, castSecurityVulnerability) } -func (o *Agent) GetSpdxId() string { - return o.SpdxId -} -func (o *Agent) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Agent) GetComment() string { - return o.Comment -} -func (o *Agent) SetComment(v string) { - o.Comment = v -} -func (o *Agent) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Agent) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v +// A distinct article or unit related to Software. +type SoftwareSoftwareArtifact struct { + Artifact + + // Provides additional purpose information of the software artifact. + SoftwareAdditionalPurposes []SoftwareSoftwarePurpose + // Provides a place for the SPDX data creator to record acknowledgement text for + // a software Package, File or Snippet. + SoftwareAttributionTexts []string + // A canonical, unique, immutable identifier of the artifact content, that may be + // used for verifying its identity and/or integrity. + SoftwareContentIdentifiers SoftwareContentIdentifierList + + // Identifies the text of one or more copyright notices for a software Package, + // File or Snippet, if any. + SoftwareCopyrightText string + // Provides information about the primary purpose of the software artifact. + SoftwarePrimaryPurpose SoftwareSoftwarePurpose } -func (o *Agent) GetDescription() string { - return o.Description + +func castSoftwareSoftwareArtifact(o any) *SoftwareSoftwareArtifact { + if o, ok := o.(AnySoftwareSoftwareArtifact); ok { + return o.asSoftwareSoftwareArtifact() + } + return nil } -func (o *Agent) SetDescription(v string) { - o.Description = v + +func (o *SoftwareSoftwareArtifact) asSoftwareSoftwareArtifact() *SoftwareSoftwareArtifact { + return o } -func (o *Agent) GetExtensions() []IExtension { - return o.Extensions + +type AnySoftwareSoftwareArtifact interface { + AnyArtifact + asSoftwareSoftwareArtifact() *SoftwareSoftwareArtifact } -func (o *Agent) SetExtensions(v ...IExtension) { - o.Extensions = v + +type SoftwareSoftwareArtifactList []AnySoftwareSoftwareArtifact + +func (o *SoftwareSoftwareArtifactList) Append(values ...AnySoftwareSoftwareArtifact) { + *o = append(*o, values...) } -func (o *Agent) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers +func (o *SoftwareSoftwareArtifactList) Remove(value AnySoftwareSoftwareArtifact) { remove(o, value) } + +func (o *SoftwareSoftwareArtifactList) SoftwareSoftwareArtifactIter() iter.Seq2[AnySoftwareSoftwareArtifact, *SoftwareSoftwareArtifact] { + return typeIter(*o, castSoftwareSoftwareArtifact) } -func (o *Agent) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v +func (o *SoftwareSoftwareArtifactList) SoftwareFileIter() iter.Seq2[AnySoftwareSoftwareArtifact, *SoftwareFile] { + return typeIter(*o, castSoftwareFile) } -func (o *Agent) GetExternalRefs() []IExternalRef { - return o.ExternalRefs +func (o *SoftwareSoftwareArtifactList) SoftwarePackageIter() iter.Seq2[AnySoftwareSoftwareArtifact, *SoftwarePackage] { + return typeIter(*o, castSoftwarePackage) } -func (o *Agent) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v +func (o *SoftwareSoftwareArtifactList) SoftwareSnippetIter() iter.Seq2[AnySoftwareSoftwareArtifact, *SoftwareSnippet] { + return typeIter(*o, castSoftwareSnippet) } -func (o *Agent) GetName() string { - return o.Name +func (o *SoftwareSoftwareArtifactList) AiAIPackageIter() iter.Seq2[AnySoftwareSoftwareArtifact, *AiAIPackage] { + return typeIter(*o, castAiAIPackage) } -func (o *Agent) SetName(v string) { - o.Name = v +func (o *SoftwareSoftwareArtifactList) DatasetDatasetPackageIter() iter.Seq2[AnySoftwareSoftwareArtifact, *DatasetDatasetPackage] { + return typeIter(*o, castDatasetDatasetPackage) } -func (o *Agent) GetSummary() string { - return o.Summary + +// A container for a grouping of SPDX-3.0 content characterizing details +// (provenence, composition, licensing, etc.) about a product. +type Bom struct { + Bundle } -func (o *Agent) SetSummary(v string) { - o.Summary = v + +func castBom(o any) *Bom { + if o, ok := o.(AnyBom); ok { + return o.asBom() + } + return nil } -func (o *Agent) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing + +func (o *Bom) asBom() *Bom { + return o } -func (o *Agent) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v + +type AnyBom interface { + AnyBundle + asBom() *Bom } -type IAnnotation interface { - IElement +type BomList []AnyBom - // GetAnnotationType describes the type of annotation. - GetAnnotationType() AnnotationType +func (o *BomList) Append(values ...AnyBom) { *o = append(*o, values...) } +func (o *BomList) Remove(value AnyBom) { remove(o, value) } - SetAnnotationType(AnnotationType) +func (o *BomList) BomIter() iter.Seq2[AnyBom, *Bom] { return typeIter(*o, castBom) } +func (o *BomList) SoftwareSbomIter() iter.Seq2[AnyBom, *SoftwareSbom] { + return typeIter(*o, castSoftwareSbom) +} - // GetContentType specifies the media type of an Element or Property. - GetContentType() string +// A license that is not listed on the SPDX License List. +type ExpandedlicensingCustomLicense struct { + ExpandedlicensingLicense +} - SetContentType(string) +func castExpandedlicensingCustomLicense(o any) *ExpandedlicensingCustomLicense { + if o, ok := o.(AnyExpandedlicensingCustomLicense); ok { + return o.asExpandedlicensingCustomLicense() + } + return nil +} - // GetStatement commentary on an assertion that an annotator has made. - GetStatement() string +func (o *ExpandedlicensingCustomLicense) asExpandedlicensingCustomLicense() *ExpandedlicensingCustomLicense { + return o +} - SetStatement(string) +type AnyExpandedlicensingCustomLicense interface { + AnyExpandedlicensingLicense + asExpandedlicensingCustomLicense() *ExpandedlicensingCustomLicense +} - // GetSubject an Element an annotator has made an assertion about. - GetSubject() IElement +type ExpandedlicensingCustomLicenseList []AnyExpandedlicensingCustomLicense - SetSubject(IElement) +func (o *ExpandedlicensingCustomLicenseList) Append(values ...AnyExpandedlicensingCustomLicense) { + *o = append(*o, values...) +} +func (o *ExpandedlicensingCustomLicenseList) Remove(value AnyExpandedlicensingCustomLicense) { + remove(o, value) } -type Annotation struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Annotation" iri-compact:"Annotation" id-prop:"spdxId"` +func (o *ExpandedlicensingCustomLicenseList) ExpandedlicensingCustomLicenseIter() iter.Seq2[AnyExpandedlicensingCustomLicense, *ExpandedlicensingCustomLicense] { + return typeIter(*o, castExpandedlicensingCustomLicense) +} - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +// Connects a vulnerability and an element designating the element as a product +// affected by the vulnerability. +type SecurityVexAffectedVulnAssessmentRelationship struct { + SecurityVexVulnAssessmentRelationship - // AnnotationType describes the type of annotation. - AnnotationType AnnotationType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/annotationType" iri-compact:"annotationType"` - // ContentType specifies the media type of an Element or Property. - ContentType string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/contentType" iri-compact:"contentType"` - // Statement commentary on an assertion that an annotator has made. - Statement string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/statement" iri-compact:"statement"` - // Subject an Element an annotator has made an assertion about. - Subject IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/subject" iri-compact:"subject"` + // Provides advise on how to mitigate or remediate a vulnerability when a VEX product + // is affected by it. + SecurityActionStatement string + // Records the time when a recommended action was communicated in a VEX statement + // to mitigate a vulnerability. + SecurityActionStatementTime time.Time } -func NewAnnotation() IAnnotation { - return &Annotation{} +func castSecurityVexAffectedVulnAssessmentRelationship(o any) *SecurityVexAffectedVulnAssessmentRelationship { + if o, ok := o.(AnySecurityVexAffectedVulnAssessmentRelationship); ok { + return o.asSecurityVexAffectedVulnAssessmentRelationship() + } + return nil } -func (o *Annotation) GetSpdxId() string { - return o.SpdxId -} -func (o *Annotation) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Annotation) GetComment() string { - return o.Comment +func (o *SecurityVexAffectedVulnAssessmentRelationship) asSecurityVexAffectedVulnAssessmentRelationship() *SecurityVexAffectedVulnAssessmentRelationship { + return o } -func (o *Annotation) SetComment(v string) { - o.Comment = v + +type AnySecurityVexAffectedVulnAssessmentRelationship interface { + AnySecurityVexVulnAssessmentRelationship + asSecurityVexAffectedVulnAssessmentRelationship() *SecurityVexAffectedVulnAssessmentRelationship } -func (o *Annotation) GetCreationInfo() ICreationInfo { - return o.CreationInfo + +type SecurityVexAffectedVulnAssessmentRelationshipList []AnySecurityVexAffectedVulnAssessmentRelationship + +func (o *SecurityVexAffectedVulnAssessmentRelationshipList) Append(values ...AnySecurityVexAffectedVulnAssessmentRelationship) { + *o = append(*o, values...) } -func (o *Annotation) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v +func (o *SecurityVexAffectedVulnAssessmentRelationshipList) Remove(value AnySecurityVexAffectedVulnAssessmentRelationship) { + remove(o, value) } -func (o *Annotation) GetDescription() string { - return o.Description + +func (o *SecurityVexAffectedVulnAssessmentRelationshipList) SecurityVexAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexAffectedVulnAssessmentRelationship, *SecurityVexAffectedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexAffectedVulnAssessmentRelationship) } -func (o *Annotation) SetDescription(v string) { - o.Description = v + +// Links a vulnerability and elements representing products (in the VEX sense) where +// a fix has been applied and are no longer affected. +type SecurityVexFixedVulnAssessmentRelationship struct { + SecurityVexVulnAssessmentRelationship } -func (o *Annotation) GetExtensions() []IExtension { - return o.Extensions + +func castSecurityVexFixedVulnAssessmentRelationship(o any) *SecurityVexFixedVulnAssessmentRelationship { + if o, ok := o.(AnySecurityVexFixedVulnAssessmentRelationship); ok { + return o.asSecurityVexFixedVulnAssessmentRelationship() + } + return nil } -func (o *Annotation) SetExtensions(v ...IExtension) { - o.Extensions = v + +func (o *SecurityVexFixedVulnAssessmentRelationship) asSecurityVexFixedVulnAssessmentRelationship() *SecurityVexFixedVulnAssessmentRelationship { + return o } -func (o *Annotation) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers + +type AnySecurityVexFixedVulnAssessmentRelationship interface { + AnySecurityVexVulnAssessmentRelationship + asSecurityVexFixedVulnAssessmentRelationship() *SecurityVexFixedVulnAssessmentRelationship } -func (o *Annotation) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v + +type SecurityVexFixedVulnAssessmentRelationshipList []AnySecurityVexFixedVulnAssessmentRelationship + +func (o *SecurityVexFixedVulnAssessmentRelationshipList) Append(values ...AnySecurityVexFixedVulnAssessmentRelationship) { + *o = append(*o, values...) } -func (o *Annotation) GetExternalRefs() []IExternalRef { - return o.ExternalRefs +func (o *SecurityVexFixedVulnAssessmentRelationshipList) Remove(value AnySecurityVexFixedVulnAssessmentRelationship) { + remove(o, value) } -func (o *Annotation) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v + +func (o *SecurityVexFixedVulnAssessmentRelationshipList) SecurityVexFixedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexFixedVulnAssessmentRelationship, *SecurityVexFixedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexFixedVulnAssessmentRelationship) } -func (o *Annotation) GetName() string { - return o.Name + +// Links a vulnerability and one or more elements designating the latter as products +// not affected by the vulnerability. +type SecurityVexNotAffectedVulnAssessmentRelationship struct { + SecurityVexVulnAssessmentRelationship + + // Explains why a VEX product is not affected by a vulnerability. It is an + // alternative in VexNotAffectedVulnAssessmentRelationship to the machine-readable + // justification label. + SecurityImpactStatement string + // Timestamp of impact statement. + SecurityImpactStatementTime time.Time + // Impact justification label to be used when linking a vulnerability to an element + // representing a VEX product with a VexNotAffectedVulnAssessmentRelationship + // relationship. + SecurityJustificationType SecurityVexJustificationType } -func (o *Annotation) SetName(v string) { - o.Name = v + +func castSecurityVexNotAffectedVulnAssessmentRelationship(o any) *SecurityVexNotAffectedVulnAssessmentRelationship { + if o, ok := o.(AnySecurityVexNotAffectedVulnAssessmentRelationship); ok { + return o.asSecurityVexNotAffectedVulnAssessmentRelationship() + } + return nil } -func (o *Annotation) GetSummary() string { - return o.Summary + +func (o *SecurityVexNotAffectedVulnAssessmentRelationship) asSecurityVexNotAffectedVulnAssessmentRelationship() *SecurityVexNotAffectedVulnAssessmentRelationship { + return o } -func (o *Annotation) SetSummary(v string) { - o.Summary = v + +type AnySecurityVexNotAffectedVulnAssessmentRelationship interface { + AnySecurityVexVulnAssessmentRelationship + asSecurityVexNotAffectedVulnAssessmentRelationship() *SecurityVexNotAffectedVulnAssessmentRelationship } -func (o *Annotation) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing + +type SecurityVexNotAffectedVulnAssessmentRelationshipList []AnySecurityVexNotAffectedVulnAssessmentRelationship + +func (o *SecurityVexNotAffectedVulnAssessmentRelationshipList) Append(values ...AnySecurityVexNotAffectedVulnAssessmentRelationship) { + *o = append(*o, values...) } -func (o *Annotation) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v +func (o *SecurityVexNotAffectedVulnAssessmentRelationshipList) Remove(value AnySecurityVexNotAffectedVulnAssessmentRelationship) { + remove(o, value) } -func (o *Annotation) GetAnnotationType() AnnotationType { - return o.AnnotationType +func (o *SecurityVexNotAffectedVulnAssessmentRelationshipList) SecurityVexNotAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexNotAffectedVulnAssessmentRelationship, *SecurityVexNotAffectedVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexNotAffectedVulnAssessmentRelationship) } -func (o *Annotation) SetAnnotationType(v AnnotationType) { - o.AnnotationType = v -} -func (o *Annotation) GetContentType() string { - return o.ContentType + +// Designates elements as products where the impact of a vulnerability is being +// investigated. +type SecurityVexUnderInvestigationVulnAssessmentRelationship struct { + SecurityVexVulnAssessmentRelationship } -func (o *Annotation) SetContentType(v string) { - o.ContentType = v + +func castSecurityVexUnderInvestigationVulnAssessmentRelationship(o any) *SecurityVexUnderInvestigationVulnAssessmentRelationship { + if o, ok := o.(AnySecurityVexUnderInvestigationVulnAssessmentRelationship); ok { + return o.asSecurityVexUnderInvestigationVulnAssessmentRelationship() + } + return nil } -func (o *Annotation) GetStatement() string { - return o.Statement + +func (o *SecurityVexUnderInvestigationVulnAssessmentRelationship) asSecurityVexUnderInvestigationVulnAssessmentRelationship() *SecurityVexUnderInvestigationVulnAssessmentRelationship { + return o } -func (o *Annotation) SetStatement(v string) { - o.Statement = v + +type AnySecurityVexUnderInvestigationVulnAssessmentRelationship interface { + AnySecurityVexVulnAssessmentRelationship + asSecurityVexUnderInvestigationVulnAssessmentRelationship() *SecurityVexUnderInvestigationVulnAssessmentRelationship } -func (o *Annotation) GetSubject() IElement { - return o.Subject + +type SecurityVexUnderInvestigationVulnAssessmentRelationshipList []AnySecurityVexUnderInvestigationVulnAssessmentRelationship + +func (o *SecurityVexUnderInvestigationVulnAssessmentRelationshipList) Append(values ...AnySecurityVexUnderInvestigationVulnAssessmentRelationship) { + *o = append(*o, values...) } -func (o *Annotation) SetSubject(v IElement) { - o.Subject = v +func (o *SecurityVexUnderInvestigationVulnAssessmentRelationshipList) Remove(value AnySecurityVexUnderInvestigationVulnAssessmentRelationship) { + remove(o, value) } -type IArtifact interface { - IElement - - // GetBuiltTime specifies the time an artifact was built. - GetBuiltTime() string +func (o *SecurityVexUnderInvestigationVulnAssessmentRelationshipList) SecurityVexUnderInvestigationVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexUnderInvestigationVulnAssessmentRelationship, *SecurityVexUnderInvestigationVulnAssessmentRelationship] { + return typeIter(*o, castSecurityVexUnderInvestigationVulnAssessmentRelationship) +} - SetBuiltTime(string) +// Refers to any object that stores content on a computer. +type SoftwareFile struct { + SoftwareSoftwareArtifact - // GetOriginatedBy identifies from where or whom the Element originally came. - GetOriginatedBy() []IAgent + // Provides information about the content type of an Element or a Property. + ContentType string + // Describes if a given file is a directory or non-directory kind of file. + SoftwareFileKind SoftwareFileKindType +} - SetOriginatedBy(...IAgent) +func castSoftwareFile(o any) *SoftwareFile { + if o, ok := o.(AnySoftwareFile); ok { + return o.asSoftwareFile() + } + return nil +} - // GetReleaseTime specifies the time an artifact was released. - GetReleaseTime() string +func (o *SoftwareFile) asSoftwareFile() *SoftwareFile { + return o +} - SetReleaseTime(string) +type AnySoftwareFile interface { + AnySoftwareSoftwareArtifact + asSoftwareFile() *SoftwareFile +} - // GetStandardName the name of a relevant standard that may apply to an artifact. - GetStandardName() []string +type SoftwareFileList []AnySoftwareFile - SetStandardName(...string) +func (o *SoftwareFileList) Append(values ...AnySoftwareFile) { *o = append(*o, values...) } +func (o *SoftwareFileList) Remove(value AnySoftwareFile) { remove(o, value) } - // GetSuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - GetSuppliedBy() IAgent +func (o *SoftwareFileList) SoftwareFileIter() iter.Seq2[AnySoftwareFile, *SoftwareFile] { + return typeIter(*o, castSoftwareFile) +} - SetSuppliedBy(IAgent) +// Refers to any unit of content that can be associated with a distribution of +// software. +type SoftwarePackage struct { + SoftwareSoftwareArtifact - // GetSupportLevel specifies the level of support associated with an artifact. - GetSupportLevel() []SupportType + // Identifies the download Uniform Resource Identifier for the package at the time + // that the document was created. + SoftwareDownloadLocation string + // A place for the SPDX document creator to record a website that serves as the + // package's home page. + SoftwareHomePage string + // Provides a place for the SPDX data creator to record the package URL string + // (in accordance with the Package URL specification) for a software Package. + SoftwarePackageUrl string + // Identify the version of a package. + SoftwarePackageVersion string + // Records any relevant background information or additional comments + // about the origin of the package. + SoftwareSourceInfo string +} - SetSupportLevel(...SupportType) +func castSoftwarePackage(o any) *SoftwarePackage { + if o, ok := o.(AnySoftwarePackage); ok { + return o.asSoftwarePackage() + } + return nil +} - // GetValidUntilTime specifies until when the artifact can be used before its usage needs to be - // reassessed. - GetValidUntilTime() string +func (o *SoftwarePackage) asSoftwarePackage() *SoftwarePackage { + return o +} - SetValidUntilTime(string) +type AnySoftwarePackage interface { + AnySoftwareSoftwareArtifact + asSoftwarePackage() *SoftwarePackage } -type Artifact struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Artifact" iri-compact:"Artifact" id-prop:"spdxId"` +type SoftwarePackageList []AnySoftwarePackage - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // BuiltTime specifies the time an artifact was built. - BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` - // OriginatedBy identifies from where or whom the Element originally came. - OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` - // ReleaseTime specifies the time an artifact was released. - ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` - // StandardName the name of a relevant standard that may apply to an artifact. - StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // SupportLevel specifies the level of support associated with an artifact. - SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` - // ValidUntilTime specifies until when the artifact can be used before its usage needs to be - // reassessed. - ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` -} +func (o *SoftwarePackageList) Append(values ...AnySoftwarePackage) { *o = append(*o, values...) } +func (o *SoftwarePackageList) Remove(value AnySoftwarePackage) { remove(o, value) } -func (o *Artifact) GetSpdxId() string { - return o.SpdxId -} -func (o *Artifact) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Artifact) GetComment() string { - return o.Comment -} -func (o *Artifact) SetComment(v string) { - o.Comment = v -} -func (o *Artifact) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Artifact) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *Artifact) GetDescription() string { - return o.Description -} -func (o *Artifact) SetDescription(v string) { - o.Description = v -} -func (o *Artifact) GetExtensions() []IExtension { - return o.Extensions -} -func (o *Artifact) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *Artifact) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers +func (o *SoftwarePackageList) SoftwarePackageIter() iter.Seq2[AnySoftwarePackage, *SoftwarePackage] { + return typeIter(*o, castSoftwarePackage) } -func (o *Artifact) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v +func (o *SoftwarePackageList) AiAIPackageIter() iter.Seq2[AnySoftwarePackage, *AiAIPackage] { + return typeIter(*o, castAiAIPackage) } -func (o *Artifact) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *Artifact) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *Artifact) GetName() string { - return o.Name -} -func (o *Artifact) SetName(v string) { - o.Name = v -} -func (o *Artifact) GetSummary() string { - return o.Summary -} -func (o *Artifact) SetSummary(v string) { - o.Summary = v -} -func (o *Artifact) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *Artifact) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v +func (o *SoftwarePackageList) DatasetDatasetPackageIter() iter.Seq2[AnySoftwarePackage, *DatasetDatasetPackage] { + return typeIter(*o, castDatasetDatasetPackage) } -func (o *Artifact) GetBuiltTime() string { - return o.BuiltTime +// A collection of SPDX Elements describing a single package. +type SoftwareSbom struct { + Bom + + // Provides information about the type of an SBOM. + SoftwareSbomTypes []SoftwareSbomType } -func (o *Artifact) SetBuiltTime(v string) { - o.BuiltTime = v + +func castSoftwareSbom(o any) *SoftwareSbom { + if o, ok := o.(AnySoftwareSbom); ok { + return o.asSoftwareSbom() + } + return nil } -func (o *Artifact) GetOriginatedBy() []IAgent { - return o.OriginatedBy + +func (o *SoftwareSbom) asSoftwareSbom() *SoftwareSbom { + return o } -func (o *Artifact) SetOriginatedBy(v ...IAgent) { - o.OriginatedBy = v + +type AnySoftwareSbom interface { + AnyBom + asSoftwareSbom() *SoftwareSbom } -func (o *Artifact) GetReleaseTime() string { - return o.ReleaseTime + +type SoftwareSbomList []AnySoftwareSbom + +func (o *SoftwareSbomList) Append(values ...AnySoftwareSbom) { *o = append(*o, values...) } +func (o *SoftwareSbomList) Remove(value AnySoftwareSbom) { remove(o, value) } + +func (o *SoftwareSbomList) SoftwareSbomIter() iter.Seq2[AnySoftwareSbom, *SoftwareSbom] { + return typeIter(*o, castSoftwareSbom) } -func (o *Artifact) SetReleaseTime(v string) { - o.ReleaseTime = v + +// Describes a certain part of a file. +type SoftwareSnippet struct { + SoftwareSoftwareArtifact + + // Defines the byte range in the original host file that the snippet information + // applies to. + SoftwareByteRange AnyPositiveIntegerRange + + // Defines the line range in the original host file that the snippet information + // applies to. + SoftwareLineRange AnyPositiveIntegerRange + + // Defines the original host file that the snippet information applies to. + SoftwareSnippetFromFile AnySoftwareFile } -func (o *Artifact) GetStandardName() []string { - return o.StandardName + +func castSoftwareSnippet(o any) *SoftwareSnippet { + if o, ok := o.(AnySoftwareSnippet); ok { + return o.asSoftwareSnippet() + } + return nil } -func (o *Artifact) SetStandardName(v ...string) { - o.StandardName = v + +func (o *SoftwareSnippet) asSoftwareSnippet() *SoftwareSnippet { + return o } -func (o *Artifact) GetSuppliedBy() IAgent { - return o.SuppliedBy + +type AnySoftwareSnippet interface { + AnySoftwareSoftwareArtifact + asSoftwareSnippet() *SoftwareSnippet } -func (o *Artifact) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v + +type SoftwareSnippetList []AnySoftwareSnippet + +func (o *SoftwareSnippetList) Append(values ...AnySoftwareSnippet) { *o = append(*o, values...) } +func (o *SoftwareSnippetList) Remove(value AnySoftwareSnippet) { remove(o, value) } + +func (o *SoftwareSnippetList) SoftwareSnippetIter() iter.Seq2[AnySoftwareSnippet, *SoftwareSnippet] { + return typeIter(*o, castSoftwareSnippet) } -func (o *Artifact) GetSupportLevel() []SupportType { - return o.SupportLevel + +// Specifies an AI package and its associated information. +type AiAIPackage struct { + SoftwarePackage + + // Indicates whether the system can perform a decision or action without human + // involvement or guidance. + AiAutonomyType PresenceType + // Captures the domain in which the AI package can be used. + AiDomains []string + // Indicates the amount of energy consumption incurred by an AI model. + AiEnergyConsumption AnyAiEnergyConsumption + + // Records a hyperparameter used to build the AI model contained in the AI + // package. + AiHyperparameters DictionaryEntryList + + // Provides relevant information about the AI software, not including the model + // description. + AiInformationAboutApplication string + // Describes relevant information about different steps of the training process. + AiInformationAboutTraining string + // Captures a limitation of the AI software. + AiLimitation string + // Records the measurement of prediction quality of the AI model. + AiMetrics DictionaryEntryList + + // Captures the threshold that was used for computation of a metric described in + // the metric field. + AiMetricDecisionThresholds DictionaryEntryList + + // Describes all the preprocessing steps applied to the training data before the + // model training. + AiModelDataPreprocessings []string + // Describes methods that can be used to explain the results from the AI model. + AiModelExplainabilitys []string + // Records the results of general safety risk assessment of the AI system. + AiSafetyRiskAssessment AiSafetyRiskAssessmentType + // Captures a standard that is being complied with. + AiStandardCompliances []string + // Records the type of the model used in the AI software. + AiTypeOfModels []string + // Records if sensitive personal information is used during model training or + // could be used during the inference. + AiUseSensitivePersonalInformation PresenceType } -func (o *Artifact) SetSupportLevel(v ...SupportType) { - o.SupportLevel = v + +func castAiAIPackage(o any) *AiAIPackage { + if o, ok := o.(AnyAiAIPackage); ok { + return o.asAiAIPackage() + } + return nil } -func (o *Artifact) GetValidUntilTime() string { - return o.ValidUntilTime + +func (o *AiAIPackage) asAiAIPackage() *AiAIPackage { + return o } -func (o *Artifact) SetValidUntilTime(v string) { - o.ValidUntilTime = v + +type AnyAiAIPackage interface { + AnySoftwarePackage + asAiAIPackage() *AiAIPackage } -type IBundle interface { - IElementCollection +type AiAIPackageList []AnyAiAIPackage - // GetContext gives information about the circumstances or unifying properties - // that Elements of the bundle have been assembled under. - GetContext() string +func (o *AiAIPackageList) Append(values ...AnyAiAIPackage) { *o = append(*o, values...) } +func (o *AiAIPackageList) Remove(value AnyAiAIPackage) { remove(o, value) } - SetContext(string) +func (o *AiAIPackageList) AiAIPackageIter() iter.Seq2[AnyAiAIPackage, *AiAIPackage] { + return typeIter(*o, castAiAIPackage) } -type Bundle struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Bundle" iri-compact:"Bundle" id-prop:"spdxId"` +// Specifies a data package and its associated information. +type DatasetDatasetPackage struct { + SoftwarePackage - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` + // Describes the anonymization methods used. + DatasetAnonymizationMethodUseds []string + // Describes the confidentiality level of the data points contained in the dataset. + DatasetConfidentialityLevel DatasetConfidentialityLevelType + // Describes how the dataset was collected. + DatasetDataCollectionProcess string + // Describes the preprocessing steps that were applied to the raw data to create the given dataset. + DatasetDataPreprocessings []string + // The field describes the availability of a dataset. + DatasetDatasetAvailability DatasetDatasetAvailabilityType + // Describes potentially noisy elements of the dataset. + DatasetDatasetNoise string + // Captures the size of the dataset. + DatasetDatasetSize int + // Describes the type of the given dataset. + DatasetDatasetTypes []DatasetDatasetType + // Describes a mechanism to update the dataset. + DatasetDatasetUpdateMechanism string + // Describes if any sensitive personal information is present in the dataset. + DatasetHasSensitivePersonalInformation PresenceType + // Describes what the given dataset should be used for. + DatasetIntendedUse string + // Records the biases that the dataset is known to encompass. + DatasetKnownBias []string + // Describes a sensor used for collecting the data. + DatasetSensors DictionaryEntryList +} - // Elements refers to one or more Elements that are part of an ElementCollection. - Elements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/element" iri-compact:"element"` - // ProfileConformance describes one a profile which the creator of this ElementCollection intends to - // conform to. - ProfileConformance []ProfileIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/profileConformance" iri-compact:"profileConformance"` - // RootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. - RootElements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/rootElement" iri-compact:"rootElement"` +func castDatasetDatasetPackage(o any) *DatasetDatasetPackage { + if o, ok := o.(AnyDatasetDatasetPackage); ok { + return o.asDatasetDatasetPackage() + } + return nil +} - // Context gives information about the circumstances or unifying properties - // that Elements of the bundle have been assembled under. - Context string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/context" iri-compact:"context"` +func (o *DatasetDatasetPackage) asDatasetDatasetPackage() *DatasetDatasetPackage { + return o } -func NewBundle() IBundle { - return &Bundle{} +type AnyDatasetDatasetPackage interface { + AnySoftwarePackage + asDatasetDatasetPackage() *DatasetDatasetPackage } -func (o *Bundle) GetSpdxId() string { - return o.SpdxId +type DatasetDatasetPackageList []AnyDatasetDatasetPackage + +func (o *DatasetDatasetPackageList) Append(values ...AnyDatasetDatasetPackage) { + *o = append(*o, values...) } -func (o *Bundle) SetSpdxId(v string) { - o.SpdxId = v +func (o *DatasetDatasetPackageList) Remove(value AnyDatasetDatasetPackage) { remove(o, value) } + +func (o *DatasetDatasetPackageList) DatasetDatasetPackageIter() iter.Seq2[AnyDatasetDatasetPackage, *DatasetDatasetPackage] { + return typeIter(*o, castDatasetDatasetPackage) } -func (o *Bundle) GetComment() string { - return o.Comment + +type ExternalIRI struct { + iri string } -func (o *Bundle) SetComment(v string) { - o.Comment = v + +func NewExternalIRI(iri string) *ExternalIRI { + return &ExternalIRI{iri: iri} } -func (o *Bundle) GetCreationInfo() ICreationInfo { - return o.CreationInfo + +func (o *ExternalIRI) asAiEnergyConsumption() *AiEnergyConsumption { return nil } +func (o *ExternalIRI) asAiEnergyConsumptionDescription() *AiEnergyConsumptionDescription { return nil } +func (o *ExternalIRI) asCreationInfo() *CreationInfo { return nil } +func (o *ExternalIRI) asDictionaryEntry() *DictionaryEntry { return nil } +func (o *ExternalIRI) asElement() *Element { return nil } +func (o *ExternalIRI) asElementCollection() *ElementCollection { return nil } +func (o *ExternalIRI) asExternalIdentifier() *ExternalIdentifier { return nil } +func (o *ExternalIRI) asExternalMap() *ExternalMap { return nil } +func (o *ExternalIRI) asExternalRef() *ExternalRef { return nil } +func (o *ExternalIRI) asIndividualElement() *IndividualElement { return nil } +func (o *ExternalIRI) asIntegrityMethod() *IntegrityMethod { return nil } +func (o *ExternalIRI) asNamespaceMap() *NamespaceMap { return nil } +func (o *ExternalIRI) asPackageVerificationCode() *PackageVerificationCode { return nil } +func (o *ExternalIRI) asPositiveIntegerRange() *PositiveIntegerRange { return nil } +func (o *ExternalIRI) asRelationship() *Relationship { return nil } +func (o *ExternalIRI) asSpdxDocument() *SpdxDocument { return nil } +func (o *ExternalIRI) asTool() *Tool { return nil } +func (o *ExternalIRI) asExpandedlicensingLicenseAddition() *ExpandedlicensingLicenseAddition { + return nil } -func (o *Bundle) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v +func (o *ExternalIRI) asExpandedlicensingListedLicenseException() *ExpandedlicensingListedLicenseException { + return nil } -func (o *Bundle) GetDescription() string { - return o.Description +func (o *ExternalIRI) asExtensionCdxPropertyEntry() *ExtensionCdxPropertyEntry { return nil } +func (o *ExternalIRI) asExtensionExtension() *ExtensionExtension { return nil } +func (o *ExternalIRI) asSecurityVulnAssessmentRelationship() *SecurityVulnAssessmentRelationship { + return nil } -func (o *Bundle) SetDescription(v string) { - o.Description = v +func (o *ExternalIRI) asSimplelicensingAnyLicenseInfo() *SimplelicensingAnyLicenseInfo { return nil } +func (o *ExternalIRI) asSimplelicensingLicenseExpression() *SimplelicensingLicenseExpression { + return nil } -func (o *Bundle) GetExtensions() []IExtension { - return o.Extensions +func (o *ExternalIRI) asSimplelicensingSimpleLicensingText() *SimplelicensingSimpleLicensingText { + return nil } -func (o *Bundle) SetExtensions(v ...IExtension) { - o.Extensions = v +func (o *ExternalIRI) asSoftwareContentIdentifier() *SoftwareContentIdentifier { return nil } +func (o *ExternalIRI) asBuildBuild() *BuildBuild { return nil } +func (o *ExternalIRI) asAgent() *Agent { return nil } +func (o *ExternalIRI) asAnnotation() *Annotation { return nil } +func (o *ExternalIRI) asArtifact() *Artifact { return nil } +func (o *ExternalIRI) asBundle() *Bundle { return nil } +func (o *ExternalIRI) asHash() *Hash { return nil } +func (o *ExternalIRI) asLifecycleScopedRelationship() *LifecycleScopedRelationship { return nil } +func (o *ExternalIRI) asOrganization() *Organization { return nil } +func (o *ExternalIRI) asPerson() *Person { return nil } +func (o *ExternalIRI) asSoftwareAgent() *SoftwareAgent { return nil } +func (o *ExternalIRI) asExpandedlicensingConjunctiveLicenseSet() *ExpandedlicensingConjunctiveLicenseSet { + return nil } -func (o *Bundle) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers +func (o *ExternalIRI) asExpandedlicensingCustomLicenseAddition() *ExpandedlicensingCustomLicenseAddition { + return nil } -func (o *Bundle) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v +func (o *ExternalIRI) asExpandedlicensingDisjunctiveLicenseSet() *ExpandedlicensingDisjunctiveLicenseSet { + return nil } -func (o *Bundle) GetExternalRefs() []IExternalRef { - return o.ExternalRefs +func (o *ExternalIRI) asExpandedlicensingExtendableLicense() *ExpandedlicensingExtendableLicense { + return nil } -func (o *Bundle) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v +func (o *ExternalIRI) asExpandedlicensingIndividualLicensingInfo() *ExpandedlicensingIndividualLicensingInfo { + return nil } -func (o *Bundle) GetName() string { - return o.Name +func (o *ExternalIRI) asExpandedlicensingLicense() *ExpandedlicensingLicense { return nil } +func (o *ExternalIRI) asExpandedlicensingListedLicense() *ExpandedlicensingListedLicense { return nil } +func (o *ExternalIRI) asExpandedlicensingOrLaterOperator() *ExpandedlicensingOrLaterOperator { + return nil } -func (o *Bundle) SetName(v string) { - o.Name = v +func (o *ExternalIRI) asExpandedlicensingWithAdditionOperator() *ExpandedlicensingWithAdditionOperator { + return nil } -func (o *Bundle) GetSummary() string { - return o.Summary +func (o *ExternalIRI) asExtensionCdxPropertiesExtension() *ExtensionCdxPropertiesExtension { + return nil } -func (o *Bundle) SetSummary(v string) { - o.Summary = v +func (o *ExternalIRI) asSecurityCvssV2VulnAssessmentRelationship() *SecurityCvssV2VulnAssessmentRelationship { + return nil } -func (o *Bundle) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing +func (o *ExternalIRI) asSecurityCvssV3VulnAssessmentRelationship() *SecurityCvssV3VulnAssessmentRelationship { + return nil } -func (o *Bundle) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v +func (o *ExternalIRI) asSecurityCvssV4VulnAssessmentRelationship() *SecurityCvssV4VulnAssessmentRelationship { + return nil } - -func (o *Bundle) GetElements() []IElement { - return o.Elements +func (o *ExternalIRI) asSecurityEpssVulnAssessmentRelationship() *SecurityEpssVulnAssessmentRelationship { + return nil } -func (o *Bundle) SetElements(v ...IElement) { - o.Elements = v -} -func (o *Bundle) GetProfileConformance() []ProfileIdentifierType { - return o.ProfileConformance -} -func (o *Bundle) SetProfileConformance(v ...ProfileIdentifierType) { - o.ProfileConformance = v -} -func (o *Bundle) GetRootElements() []IElement { - return o.RootElements -} -func (o *Bundle) SetRootElements(v ...IElement) { - o.RootElements = v -} - -func (o *Bundle) GetContext() string { - return o.Context -} -func (o *Bundle) SetContext(v string) { - o.Context = v -} - -type IHash interface { - IIntegrityMethod - - // GetAlgorithm specifies the algorithm used for calculating the hash value. - GetAlgorithm() HashAlgorithm - - SetAlgorithm(HashAlgorithm) - - // GetHashValue the result of applying a hash algorithm to an Element. - GetHashValue() string - - SetHashValue(string) -} - -type Hash struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Hash" iri-compact:"Hash"` - - Iri string `iri:"@id"` - - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - - // Algorithm specifies the algorithm used for calculating the hash value. - Algorithm HashAlgorithm `iri:"https://spdx.org/rdf/3.0.0/terms/Core/algorithm" iri-compact:"algorithm"` - // HashValue the result of applying a hash algorithm to an Element. - HashValue string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/hashValue" iri-compact:"hashValue"` -} - -func NewHash() IHash { - return &Hash{} -} - -func (o *Hash) GetComment() string { - return o.Comment -} -func (o *Hash) SetComment(v string) { - o.Comment = v -} - -func (o *Hash) GetAlgorithm() HashAlgorithm { - return o.Algorithm -} -func (o *Hash) SetAlgorithm(v HashAlgorithm) { - o.Algorithm = v -} -func (o *Hash) GetHashValue() string { - return o.HashValue -} -func (o *Hash) SetHashValue(v string) { - o.HashValue = v -} - -type ILifecycleScopedRelationship interface { - IRelationship - - // GetScope capture the scope of information about a specific relationship between elements. - GetScope() LifecycleScopeType - - SetScope(LifecycleScopeType) -} - -type LifecycleScopedRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopedRelationship" iri-compact:"LifecycleScopedRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // Scope capture the scope of information about a specific relationship between elements. - Scope LifecycleScopeType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/scope" iri-compact:"scope"` -} - -func NewLifecycleScopedRelationship() ILifecycleScopedRelationship { - return &LifecycleScopedRelationship{} -} - -func (o *LifecycleScopedRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *LifecycleScopedRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *LifecycleScopedRelationship) GetComment() string { - return o.Comment -} -func (o *LifecycleScopedRelationship) SetComment(v string) { - o.Comment = v -} -func (o *LifecycleScopedRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *LifecycleScopedRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *LifecycleScopedRelationship) GetDescription() string { - return o.Description -} -func (o *LifecycleScopedRelationship) SetDescription(v string) { - o.Description = v -} -func (o *LifecycleScopedRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *LifecycleScopedRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *LifecycleScopedRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *LifecycleScopedRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *LifecycleScopedRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *LifecycleScopedRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *LifecycleScopedRelationship) GetName() string { - return o.Name -} -func (o *LifecycleScopedRelationship) SetName(v string) { - o.Name = v -} -func (o *LifecycleScopedRelationship) GetSummary() string { - return o.Summary -} -func (o *LifecycleScopedRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *LifecycleScopedRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *LifecycleScopedRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *LifecycleScopedRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *LifecycleScopedRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *LifecycleScopedRelationship) GetEndTime() string { - return o.EndTime -} -func (o *LifecycleScopedRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *LifecycleScopedRelationship) GetFrom() IElement { - return o.From -} -func (o *LifecycleScopedRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *LifecycleScopedRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *LifecycleScopedRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *LifecycleScopedRelationship) GetStartTime() string { - return o.StartTime -} -func (o *LifecycleScopedRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *LifecycleScopedRelationship) GetTo() []IElement { - return o.To -} -func (o *LifecycleScopedRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *LifecycleScopedRelationship) GetScope() LifecycleScopeType { - return o.Scope -} -func (o *LifecycleScopedRelationship) SetScope(v LifecycleScopeType) { - o.Scope = v -} - -type IOrganization interface { - IAgent -} - -type Organization struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Organization" iri-compact:"Organization" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` -} - -func NewOrganization() IOrganization { - return &Organization{} -} - -func (o *Organization) GetSpdxId() string { - return o.SpdxId -} -func (o *Organization) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Organization) GetComment() string { - return o.Comment -} -func (o *Organization) SetComment(v string) { - o.Comment = v -} -func (o *Organization) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Organization) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *Organization) GetDescription() string { - return o.Description -} -func (o *Organization) SetDescription(v string) { - o.Description = v -} -func (o *Organization) GetExtensions() []IExtension { - return o.Extensions -} -func (o *Organization) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *Organization) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *Organization) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *Organization) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *Organization) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *Organization) GetName() string { - return o.Name -} -func (o *Organization) SetName(v string) { - o.Name = v -} -func (o *Organization) GetSummary() string { - return o.Summary -} -func (o *Organization) SetSummary(v string) { - o.Summary = v -} -func (o *Organization) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *Organization) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -type IPerson interface { - IAgent -} - -type Person struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Person" iri-compact:"Person" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` -} - -func NewPerson() IPerson { - return &Person{} -} - -func (o *Person) GetSpdxId() string { - return o.SpdxId -} -func (o *Person) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Person) GetComment() string { - return o.Comment -} -func (o *Person) SetComment(v string) { - o.Comment = v -} -func (o *Person) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Person) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *Person) GetDescription() string { - return o.Description -} -func (o *Person) SetDescription(v string) { - o.Description = v -} -func (o *Person) GetExtensions() []IExtension { - return o.Extensions -} -func (o *Person) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *Person) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *Person) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *Person) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *Person) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *Person) GetName() string { - return o.Name -} -func (o *Person) SetName(v string) { - o.Name = v -} -func (o *Person) GetSummary() string { - return o.Summary -} -func (o *Person) SetSummary(v string) { - o.Summary = v -} -func (o *Person) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *Person) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -type ISoftwareAgent interface { - IAgent -} - -type SoftwareAgent struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/SoftwareAgent" iri-compact:"SoftwareAgent" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` -} - -func NewSoftwareAgent() ISoftwareAgent { - return &SoftwareAgent{} -} - -func (o *SoftwareAgent) GetSpdxId() string { - return o.SpdxId -} -func (o *SoftwareAgent) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *SoftwareAgent) GetComment() string { - return o.Comment -} -func (o *SoftwareAgent) SetComment(v string) { - o.Comment = v -} -func (o *SoftwareAgent) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *SoftwareAgent) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *SoftwareAgent) GetDescription() string { - return o.Description -} -func (o *SoftwareAgent) SetDescription(v string) { - o.Description = v -} -func (o *SoftwareAgent) GetExtensions() []IExtension { - return o.Extensions -} -func (o *SoftwareAgent) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *SoftwareAgent) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *SoftwareAgent) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *SoftwareAgent) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *SoftwareAgent) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *SoftwareAgent) GetName() string { - return o.Name -} -func (o *SoftwareAgent) SetName(v string) { - o.Name = v -} -func (o *SoftwareAgent) GetSummary() string { - return o.Summary -} -func (o *SoftwareAgent) SetSummary(v string) { - o.Summary = v -} -func (o *SoftwareAgent) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *SoftwareAgent) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -type IConjunctiveLicenseSet interface { - IAnyLicenseInfo - - // GetMember a license expression participating in a license set. - GetMember() []IAnyLicenseInfo - - SetMember(...IAnyLicenseInfo) -} - -type ConjunctiveLicenseSet struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/ConjunctiveLicenseSet" iri-compact:"expandedlicensing_ConjunctiveLicenseSet" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Member a license expression participating in a license set. - Member []IAnyLicenseInfo `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/member" iri-compact:"expandedlicensing_member"` -} - -func NewConjunctiveLicenseSet() IConjunctiveLicenseSet { - return &ConjunctiveLicenseSet{} -} - -func (o *ConjunctiveLicenseSet) GetSpdxId() string { - return o.SpdxId -} -func (o *ConjunctiveLicenseSet) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *ConjunctiveLicenseSet) GetComment() string { - return o.Comment -} -func (o *ConjunctiveLicenseSet) SetComment(v string) { - o.Comment = v -} -func (o *ConjunctiveLicenseSet) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *ConjunctiveLicenseSet) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *ConjunctiveLicenseSet) GetDescription() string { - return o.Description -} -func (o *ConjunctiveLicenseSet) SetDescription(v string) { - o.Description = v -} -func (o *ConjunctiveLicenseSet) GetExtensions() []IExtension { - return o.Extensions -} -func (o *ConjunctiveLicenseSet) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *ConjunctiveLicenseSet) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *ConjunctiveLicenseSet) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *ConjunctiveLicenseSet) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *ConjunctiveLicenseSet) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *ConjunctiveLicenseSet) GetName() string { - return o.Name -} -func (o *ConjunctiveLicenseSet) SetName(v string) { - o.Name = v -} -func (o *ConjunctiveLicenseSet) GetSummary() string { - return o.Summary -} -func (o *ConjunctiveLicenseSet) SetSummary(v string) { - o.Summary = v -} -func (o *ConjunctiveLicenseSet) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *ConjunctiveLicenseSet) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *ConjunctiveLicenseSet) GetMember() []IAnyLicenseInfo { - return o.Member -} -func (o *ConjunctiveLicenseSet) SetMember(v ...IAnyLicenseInfo) { - o.Member = v -} - -type ICustomLicenseAddition interface { - ILicenseAddition -} - -type CustomLicenseAddition struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/CustomLicenseAddition" iri-compact:"expandedlicensing_CustomLicenseAddition" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // AdditionText identifies the full text of a LicenseAddition. - AdditionText string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/additionText" iri-compact:"expandedlicensing_additionText"` - // IsDeprecatedAdditionId specifies whether an additional text identifier has been marked as deprecated. - IsDeprecatedAdditionId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedAdditionId" iri-compact:"expandedlicensing_isDeprecatedAdditionId"` - // LicenseXml identifies all the text and metadata associated with a license in the license - // XML format. - LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` - // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated - // License or LicenseAddition. - ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` - // SeeAlso contains a URL where the License or LicenseAddition can be found in use. - SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` - // StandardAdditionTemplate identifies the full text of a LicenseAddition, in SPDX templating format. - StandardAdditionTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardAdditionTemplate" iri-compact:"expandedlicensing_standardAdditionTemplate"` -} - -func NewCustomLicenseAddition() ICustomLicenseAddition { - return &CustomLicenseAddition{} -} - -func (o *CustomLicenseAddition) GetSpdxId() string { - return o.SpdxId -} -func (o *CustomLicenseAddition) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *CustomLicenseAddition) GetComment() string { - return o.Comment -} -func (o *CustomLicenseAddition) SetComment(v string) { - o.Comment = v -} -func (o *CustomLicenseAddition) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *CustomLicenseAddition) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *CustomLicenseAddition) GetDescription() string { - return o.Description -} -func (o *CustomLicenseAddition) SetDescription(v string) { - o.Description = v -} -func (o *CustomLicenseAddition) GetExtensions() []IExtension { - return o.Extensions -} -func (o *CustomLicenseAddition) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *CustomLicenseAddition) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *CustomLicenseAddition) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *CustomLicenseAddition) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *CustomLicenseAddition) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *CustomLicenseAddition) GetName() string { - return o.Name -} -func (o *CustomLicenseAddition) SetName(v string) { - o.Name = v -} -func (o *CustomLicenseAddition) GetSummary() string { - return o.Summary -} -func (o *CustomLicenseAddition) SetSummary(v string) { - o.Summary = v -} -func (o *CustomLicenseAddition) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *CustomLicenseAddition) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *CustomLicenseAddition) GetAdditionText() string { - return o.AdditionText -} -func (o *CustomLicenseAddition) SetAdditionText(v string) { - o.AdditionText = v -} -func (o *CustomLicenseAddition) GetIsDeprecatedAdditionId() bool { - return o.IsDeprecatedAdditionId -} -func (o *CustomLicenseAddition) SetIsDeprecatedAdditionId(v bool) { - o.IsDeprecatedAdditionId = v -} -func (o *CustomLicenseAddition) GetLicenseXml() string { - return o.LicenseXml -} -func (o *CustomLicenseAddition) SetLicenseXml(v string) { - o.LicenseXml = v -} -func (o *CustomLicenseAddition) GetObsoletedBy() string { - return o.ObsoletedBy -} -func (o *CustomLicenseAddition) SetObsoletedBy(v string) { - o.ObsoletedBy = v -} -func (o *CustomLicenseAddition) GetSeeAlso() []string { - return o.SeeAlso -} -func (o *CustomLicenseAddition) SetSeeAlso(v ...string) { - o.SeeAlso = v -} -func (o *CustomLicenseAddition) GetStandardAdditionTemplate() string { - return o.StandardAdditionTemplate -} -func (o *CustomLicenseAddition) SetStandardAdditionTemplate(v string) { - o.StandardAdditionTemplate = v -} - -type IDisjunctiveLicenseSet interface { - IAnyLicenseInfo - - // GetMember a license expression participating in a license set. - GetMember() []IAnyLicenseInfo - - SetMember(...IAnyLicenseInfo) -} - -type DisjunctiveLicenseSet struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/DisjunctiveLicenseSet" iri-compact:"expandedlicensing_DisjunctiveLicenseSet" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Member a license expression participating in a license set. - Member []IAnyLicenseInfo `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/member" iri-compact:"expandedlicensing_member"` -} - -func NewDisjunctiveLicenseSet() IDisjunctiveLicenseSet { - return &DisjunctiveLicenseSet{} -} - -func (o *DisjunctiveLicenseSet) GetSpdxId() string { - return o.SpdxId -} -func (o *DisjunctiveLicenseSet) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *DisjunctiveLicenseSet) GetComment() string { - return o.Comment -} -func (o *DisjunctiveLicenseSet) SetComment(v string) { - o.Comment = v -} -func (o *DisjunctiveLicenseSet) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *DisjunctiveLicenseSet) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *DisjunctiveLicenseSet) GetDescription() string { - return o.Description -} -func (o *DisjunctiveLicenseSet) SetDescription(v string) { - o.Description = v -} -func (o *DisjunctiveLicenseSet) GetExtensions() []IExtension { - return o.Extensions -} -func (o *DisjunctiveLicenseSet) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *DisjunctiveLicenseSet) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *DisjunctiveLicenseSet) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *DisjunctiveLicenseSet) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *DisjunctiveLicenseSet) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *DisjunctiveLicenseSet) GetName() string { - return o.Name -} -func (o *DisjunctiveLicenseSet) SetName(v string) { - o.Name = v -} -func (o *DisjunctiveLicenseSet) GetSummary() string { - return o.Summary -} -func (o *DisjunctiveLicenseSet) SetSummary(v string) { - o.Summary = v -} -func (o *DisjunctiveLicenseSet) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *DisjunctiveLicenseSet) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *DisjunctiveLicenseSet) GetMember() []IAnyLicenseInfo { - return o.Member -} -func (o *DisjunctiveLicenseSet) SetMember(v ...IAnyLicenseInfo) { - o.Member = v -} - -type IExtendableLicense interface { - IAnyLicenseInfo -} - -type ExtendableLicense struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/ExtendableLicense" iri-compact:"expandedlicensing_ExtendableLicense" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` -} - -func (o *ExtendableLicense) GetSpdxId() string { - return o.SpdxId -} -func (o *ExtendableLicense) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *ExtendableLicense) GetComment() string { - return o.Comment -} -func (o *ExtendableLicense) SetComment(v string) { - o.Comment = v -} -func (o *ExtendableLicense) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *ExtendableLicense) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *ExtendableLicense) GetDescription() string { - return o.Description -} -func (o *ExtendableLicense) SetDescription(v string) { - o.Description = v -} -func (o *ExtendableLicense) GetExtensions() []IExtension { - return o.Extensions -} -func (o *ExtendableLicense) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *ExtendableLicense) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *ExtendableLicense) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *ExtendableLicense) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *ExtendableLicense) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *ExtendableLicense) GetName() string { - return o.Name -} -func (o *ExtendableLicense) SetName(v string) { - o.Name = v -} -func (o *ExtendableLicense) GetSummary() string { - return o.Summary -} -func (o *ExtendableLicense) SetSummary(v string) { - o.Summary = v -} -func (o *ExtendableLicense) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *ExtendableLicense) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -type IIndividualLicensingInfo interface { - IAnyLicenseInfo -} - -type IndividualLicensingInfo struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/IndividualLicensingInfo" iri-compact:"expandedlicensing_IndividualLicensingInfo" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` -} - -func NewIndividualLicensingInfo() IIndividualLicensingInfo { - return &IndividualLicensingInfo{} -} - -func (o *IndividualLicensingInfo) GetSpdxId() string { - return o.SpdxId -} -func (o *IndividualLicensingInfo) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *IndividualLicensingInfo) GetComment() string { - return o.Comment -} -func (o *IndividualLicensingInfo) SetComment(v string) { - o.Comment = v -} -func (o *IndividualLicensingInfo) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *IndividualLicensingInfo) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *IndividualLicensingInfo) GetDescription() string { - return o.Description -} -func (o *IndividualLicensingInfo) SetDescription(v string) { - o.Description = v -} -func (o *IndividualLicensingInfo) GetExtensions() []IExtension { - return o.Extensions -} -func (o *IndividualLicensingInfo) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *IndividualLicensingInfo) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *IndividualLicensingInfo) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *IndividualLicensingInfo) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *IndividualLicensingInfo) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *IndividualLicensingInfo) GetName() string { - return o.Name -} -func (o *IndividualLicensingInfo) SetName(v string) { - o.Name = v -} -func (o *IndividualLicensingInfo) GetSummary() string { - return o.Summary -} -func (o *IndividualLicensingInfo) SetSummary(v string) { - o.Summary = v -} -func (o *IndividualLicensingInfo) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *IndividualLicensingInfo) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -type ILicense interface { - IExtendableLicense - - // GetIsDeprecatedLicenseId specifies whether a license or additional text identifier has been marked as - // deprecated. - GetIsDeprecatedLicenseId() bool - - SetIsDeprecatedLicenseId(bool) - - // GetIsFsfLibre specifies whether the License is listed as free by the - // [Free Software Foundation (FSF)](https://fsf.org). - GetIsFsfLibre() bool - - SetIsFsfLibre(bool) - - // GetIsOsiApproved specifies whether the License is listed as approved by the - // [Open Source Initiative (OSI)](https://opensource.org). - GetIsOsiApproved() bool - - SetIsOsiApproved(bool) - - // GetLicenseXml identifies all the text and metadata associated with a license in the license - // XML format. - GetLicenseXml() string - - SetLicenseXml(string) - - // GetObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated - // License or LicenseAddition. - GetObsoletedBy() string - - SetObsoletedBy(string) - - // GetSeeAlso contains a URL where the License or LicenseAddition can be found in use. - GetSeeAlso() []string - - SetSeeAlso(...string) - - // GetStandardLicenseHeader provides a License author's preferred text to indicate that a file is covered - // by the License. - GetStandardLicenseHeader() string - - SetStandardLicenseHeader(string) - - // GetStandardLicenseTemplate identifies the full text of a License, in SPDX templating format. - GetStandardLicenseTemplate() string - - SetStandardLicenseTemplate(string) - - // GetLicenseText identifies the full text of a License or Addition. - GetLicenseText() string - - SetLicenseText(string) -} - -type License struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/License" iri-compact:"expandedlicensing_License" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // IsDeprecatedLicenseId specifies whether a license or additional text identifier has been marked as - // deprecated. - IsDeprecatedLicenseId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedLicenseId" iri-compact:"expandedlicensing_isDeprecatedLicenseId"` - // IsFsfLibre specifies whether the License is listed as free by the - // [Free Software Foundation (FSF)](https://fsf.org). - IsFsfLibre bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isFsfLibre" iri-compact:"expandedlicensing_isFsfLibre"` - // IsOsiApproved specifies whether the License is listed as approved by the - // [Open Source Initiative (OSI)](https://opensource.org). - IsOsiApproved bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isOsiApproved" iri-compact:"expandedlicensing_isOsiApproved"` - // LicenseXml identifies all the text and metadata associated with a license in the license - // XML format. - LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` - // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated - // License or LicenseAddition. - ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` - // SeeAlso contains a URL where the License or LicenseAddition can be found in use. - SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` - // StandardLicenseHeader provides a License author's preferred text to indicate that a file is covered - // by the License. - StandardLicenseHeader string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseHeader" iri-compact:"expandedlicensing_standardLicenseHeader"` - // StandardLicenseTemplate identifies the full text of a License, in SPDX templating format. - StandardLicenseTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseTemplate" iri-compact:"expandedlicensing_standardLicenseTemplate"` - // LicenseText identifies the full text of a License or Addition. - LicenseText string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` -} - -func (o *License) GetSpdxId() string { - return o.SpdxId -} -func (o *License) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *License) GetComment() string { - return o.Comment -} -func (o *License) SetComment(v string) { - o.Comment = v -} -func (o *License) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *License) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *License) GetDescription() string { - return o.Description -} -func (o *License) SetDescription(v string) { - o.Description = v -} -func (o *License) GetExtensions() []IExtension { - return o.Extensions -} -func (o *License) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *License) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *License) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *License) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *License) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *License) GetName() string { - return o.Name -} -func (o *License) SetName(v string) { - o.Name = v -} -func (o *License) GetSummary() string { - return o.Summary -} -func (o *License) SetSummary(v string) { - o.Summary = v -} -func (o *License) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *License) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *License) GetIsDeprecatedLicenseId() bool { - return o.IsDeprecatedLicenseId -} -func (o *License) SetIsDeprecatedLicenseId(v bool) { - o.IsDeprecatedLicenseId = v -} -func (o *License) GetIsFsfLibre() bool { - return o.IsFsfLibre -} -func (o *License) SetIsFsfLibre(v bool) { - o.IsFsfLibre = v -} -func (o *License) GetIsOsiApproved() bool { - return o.IsOsiApproved -} -func (o *License) SetIsOsiApproved(v bool) { - o.IsOsiApproved = v -} -func (o *License) GetLicenseXml() string { - return o.LicenseXml -} -func (o *License) SetLicenseXml(v string) { - o.LicenseXml = v -} -func (o *License) GetObsoletedBy() string { - return o.ObsoletedBy -} -func (o *License) SetObsoletedBy(v string) { - o.ObsoletedBy = v -} -func (o *License) GetSeeAlso() []string { - return o.SeeAlso -} -func (o *License) SetSeeAlso(v ...string) { - o.SeeAlso = v -} -func (o *License) GetStandardLicenseHeader() string { - return o.StandardLicenseHeader -} -func (o *License) SetStandardLicenseHeader(v string) { - o.StandardLicenseHeader = v -} -func (o *License) GetStandardLicenseTemplate() string { - return o.StandardLicenseTemplate -} -func (o *License) SetStandardLicenseTemplate(v string) { - o.StandardLicenseTemplate = v -} -func (o *License) GetLicenseText() string { - return o.LicenseText -} -func (o *License) SetLicenseText(v string) { - o.LicenseText = v -} - -type IListedLicense interface { - ILicense - - // GetDeprecatedVersion specifies the SPDX License List version in which this license or exception - // identifier was deprecated. - GetDeprecatedVersion() string - - SetDeprecatedVersion(string) - - // GetListVersionAdded specifies the SPDX License List version in which this ListedLicense or - // ListedLicenseException identifier was first added. - GetListVersionAdded() string - - SetListVersionAdded(string) -} - -type ListedLicense struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/ListedLicense" iri-compact:"expandedlicensing_ListedLicense" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // IsDeprecatedLicenseId specifies whether a license or additional text identifier has been marked as - // deprecated. - IsDeprecatedLicenseId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedLicenseId" iri-compact:"expandedlicensing_isDeprecatedLicenseId"` - // IsFsfLibre specifies whether the License is listed as free by the - // [Free Software Foundation (FSF)](https://fsf.org). - IsFsfLibre bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isFsfLibre" iri-compact:"expandedlicensing_isFsfLibre"` - // IsOsiApproved specifies whether the License is listed as approved by the - // [Open Source Initiative (OSI)](https://opensource.org). - IsOsiApproved bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isOsiApproved" iri-compact:"expandedlicensing_isOsiApproved"` - // LicenseXml identifies all the text and metadata associated with a license in the license - // XML format. - LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` - // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated - // License or LicenseAddition. - ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` - // SeeAlso contains a URL where the License or LicenseAddition can be found in use. - SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` - // StandardLicenseHeader provides a License author's preferred text to indicate that a file is covered - // by the License. - StandardLicenseHeader string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseHeader" iri-compact:"expandedlicensing_standardLicenseHeader"` - // StandardLicenseTemplate identifies the full text of a License, in SPDX templating format. - StandardLicenseTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseTemplate" iri-compact:"expandedlicensing_standardLicenseTemplate"` - // LicenseText identifies the full text of a License or Addition. - LicenseText string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` - - // DeprecatedVersion specifies the SPDX License List version in which this license or exception - // identifier was deprecated. - DeprecatedVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/deprecatedVersion" iri-compact:"expandedlicensing_deprecatedVersion"` - // ListVersionAdded specifies the SPDX License List version in which this ListedLicense or - // ListedLicenseException identifier was first added. - ListVersionAdded string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/listVersionAdded" iri-compact:"expandedlicensing_listVersionAdded"` -} - -func NewListedLicense() IListedLicense { - return &ListedLicense{} -} - -func (o *ListedLicense) GetSpdxId() string { - return o.SpdxId -} -func (o *ListedLicense) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *ListedLicense) GetComment() string { - return o.Comment -} -func (o *ListedLicense) SetComment(v string) { - o.Comment = v -} -func (o *ListedLicense) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *ListedLicense) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *ListedLicense) GetDescription() string { - return o.Description -} -func (o *ListedLicense) SetDescription(v string) { - o.Description = v -} -func (o *ListedLicense) GetExtensions() []IExtension { - return o.Extensions -} -func (o *ListedLicense) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *ListedLicense) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *ListedLicense) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *ListedLicense) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *ListedLicense) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *ListedLicense) GetName() string { - return o.Name -} -func (o *ListedLicense) SetName(v string) { - o.Name = v -} -func (o *ListedLicense) GetSummary() string { - return o.Summary -} -func (o *ListedLicense) SetSummary(v string) { - o.Summary = v -} -func (o *ListedLicense) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *ListedLicense) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *ListedLicense) GetIsDeprecatedLicenseId() bool { - return o.IsDeprecatedLicenseId -} -func (o *ListedLicense) SetIsDeprecatedLicenseId(v bool) { - o.IsDeprecatedLicenseId = v -} -func (o *ListedLicense) GetIsFsfLibre() bool { - return o.IsFsfLibre -} -func (o *ListedLicense) SetIsFsfLibre(v bool) { - o.IsFsfLibre = v -} -func (o *ListedLicense) GetIsOsiApproved() bool { - return o.IsOsiApproved -} -func (o *ListedLicense) SetIsOsiApproved(v bool) { - o.IsOsiApproved = v -} -func (o *ListedLicense) GetLicenseXml() string { - return o.LicenseXml -} -func (o *ListedLicense) SetLicenseXml(v string) { - o.LicenseXml = v -} -func (o *ListedLicense) GetObsoletedBy() string { - return o.ObsoletedBy -} -func (o *ListedLicense) SetObsoletedBy(v string) { - o.ObsoletedBy = v -} -func (o *ListedLicense) GetSeeAlso() []string { - return o.SeeAlso -} -func (o *ListedLicense) SetSeeAlso(v ...string) { - o.SeeAlso = v -} -func (o *ListedLicense) GetStandardLicenseHeader() string { - return o.StandardLicenseHeader -} -func (o *ListedLicense) SetStandardLicenseHeader(v string) { - o.StandardLicenseHeader = v -} -func (o *ListedLicense) GetStandardLicenseTemplate() string { - return o.StandardLicenseTemplate -} -func (o *ListedLicense) SetStandardLicenseTemplate(v string) { - o.StandardLicenseTemplate = v -} -func (o *ListedLicense) GetLicenseText() string { - return o.LicenseText -} -func (o *ListedLicense) SetLicenseText(v string) { - o.LicenseText = v -} - -func (o *ListedLicense) GetDeprecatedVersion() string { - return o.DeprecatedVersion -} -func (o *ListedLicense) SetDeprecatedVersion(v string) { - o.DeprecatedVersion = v -} -func (o *ListedLicense) GetListVersionAdded() string { - return o.ListVersionAdded -} -func (o *ListedLicense) SetListVersionAdded(v string) { - o.ListVersionAdded = v -} - -type IOrLaterOperator interface { - IExtendableLicense - - // GetSubjectLicense a License participating in an 'or later' model. - GetSubjectLicense() ILicense - - SetSubjectLicense(ILicense) -} - -type OrLaterOperator struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/OrLaterOperator" iri-compact:"expandedlicensing_OrLaterOperator" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // SubjectLicense a License participating in an 'or later' model. - SubjectLicense ILicense `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/subjectLicense" iri-compact:"expandedlicensing_subjectLicense"` -} - -func NewOrLaterOperator() IOrLaterOperator { - return &OrLaterOperator{} -} - -func (o *OrLaterOperator) GetSpdxId() string { - return o.SpdxId -} -func (o *OrLaterOperator) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *OrLaterOperator) GetComment() string { - return o.Comment -} -func (o *OrLaterOperator) SetComment(v string) { - o.Comment = v -} -func (o *OrLaterOperator) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *OrLaterOperator) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *OrLaterOperator) GetDescription() string { - return o.Description -} -func (o *OrLaterOperator) SetDescription(v string) { - o.Description = v -} -func (o *OrLaterOperator) GetExtensions() []IExtension { - return o.Extensions -} -func (o *OrLaterOperator) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *OrLaterOperator) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *OrLaterOperator) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *OrLaterOperator) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *OrLaterOperator) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *OrLaterOperator) GetName() string { - return o.Name -} -func (o *OrLaterOperator) SetName(v string) { - o.Name = v -} -func (o *OrLaterOperator) GetSummary() string { - return o.Summary -} -func (o *OrLaterOperator) SetSummary(v string) { - o.Summary = v -} -func (o *OrLaterOperator) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *OrLaterOperator) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *OrLaterOperator) GetSubjectLicense() ILicense { - return o.SubjectLicense -} -func (o *OrLaterOperator) SetSubjectLicense(v ILicense) { - o.SubjectLicense = v -} - -type IWithAdditionOperator interface { - IAnyLicenseInfo - - // GetSubjectAddition a LicenseAddition participating in a 'with addition' model. - GetSubjectAddition() ILicenseAddition - - SetSubjectAddition(ILicenseAddition) - - // GetSubjectExtendableLicense a License participating in a 'with addition' model. - GetSubjectExtendableLicense() IExtendableLicense - - SetSubjectExtendableLicense(IExtendableLicense) -} - -type WithAdditionOperator struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/WithAdditionOperator" iri-compact:"expandedlicensing_WithAdditionOperator" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // SubjectAddition a LicenseAddition participating in a 'with addition' model. - SubjectAddition ILicenseAddition `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/subjectAddition" iri-compact:"expandedlicensing_subjectAddition"` - // SubjectExtendableLicense a License participating in a 'with addition' model. - SubjectExtendableLicense IExtendableLicense `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/subjectExtendableLicense" iri-compact:"expandedlicensing_subjectExtendableLicense"` -} - -func NewWithAdditionOperator() IWithAdditionOperator { - return &WithAdditionOperator{} -} - -func (o *WithAdditionOperator) GetSpdxId() string { - return o.SpdxId -} -func (o *WithAdditionOperator) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *WithAdditionOperator) GetComment() string { - return o.Comment -} -func (o *WithAdditionOperator) SetComment(v string) { - o.Comment = v -} -func (o *WithAdditionOperator) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *WithAdditionOperator) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *WithAdditionOperator) GetDescription() string { - return o.Description -} -func (o *WithAdditionOperator) SetDescription(v string) { - o.Description = v -} -func (o *WithAdditionOperator) GetExtensions() []IExtension { - return o.Extensions -} -func (o *WithAdditionOperator) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *WithAdditionOperator) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *WithAdditionOperator) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *WithAdditionOperator) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *WithAdditionOperator) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *WithAdditionOperator) GetName() string { - return o.Name -} -func (o *WithAdditionOperator) SetName(v string) { - o.Name = v -} -func (o *WithAdditionOperator) GetSummary() string { - return o.Summary -} -func (o *WithAdditionOperator) SetSummary(v string) { - o.Summary = v -} -func (o *WithAdditionOperator) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *WithAdditionOperator) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *WithAdditionOperator) GetSubjectAddition() ILicenseAddition { - return o.SubjectAddition -} -func (o *WithAdditionOperator) SetSubjectAddition(v ILicenseAddition) { - o.SubjectAddition = v -} -func (o *WithAdditionOperator) GetSubjectExtendableLicense() IExtendableLicense { - return o.SubjectExtendableLicense -} -func (o *WithAdditionOperator) SetSubjectExtendableLicense(v IExtendableLicense) { - o.SubjectExtendableLicense = v -} - -type ICdxPropertiesExtension interface { - IExtension - - // GetCdxProperty provides a map of a property names to a values. - GetCdxProperty() []ICdxPropertyEntry - - SetCdxProperty(...ICdxPropertyEntry) -} - -type CdxPropertiesExtension struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/CdxPropertiesExtension" iri-compact:"extension_CdxPropertiesExtension"` - - Iri string `iri:"@id"` - - // CdxProperty provides a map of a property names to a values. - CdxProperty []ICdxPropertyEntry `iri:"https://spdx.org/rdf/3.0.0/terms/Extension/cdxProperty" iri-compact:"extension_cdxProperty"` -} - -func NewCdxPropertiesExtension() ICdxPropertiesExtension { - return &CdxPropertiesExtension{} -} - -func (o *CdxPropertiesExtension) GetCdxProperty() []ICdxPropertyEntry { - return o.CdxProperty -} -func (o *CdxPropertiesExtension) SetCdxProperty(v ...ICdxPropertyEntry) { - o.CdxProperty = v -} - -type ICvssV2VulnAssessmentRelationship interface { - IVulnAssessmentRelationship - - // GetScore provides a numerical (0-10) representation of the severity of a vulnerability. - GetScore() float64 - - SetScore(float64) - - // GetVectorString specifies the CVSS vector string for a vulnerability. - GetVectorString() string - - SetVectorString(string) -} - -type CvssV2VulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/CvssV2VulnAssessmentRelationship" iri-compact:"security_CvssV2VulnAssessmentRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` - - // Score provides a numerical (0-10) representation of the severity of a vulnerability. - Score float64 `iri:"https://spdx.org/rdf/3.0.0/terms/Security/score" iri-compact:"security_score"` - // VectorString specifies the CVSS vector string for a vulnerability. - VectorString string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vectorString" iri-compact:"security_vectorString"` -} - -func NewCvssV2VulnAssessmentRelationship() ICvssV2VulnAssessmentRelationship { - return &CvssV2VulnAssessmentRelationship{} -} - -func (o *CvssV2VulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *CvssV2VulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *CvssV2VulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *CvssV2VulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *CvssV2VulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *CvssV2VulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *CvssV2VulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *CvssV2VulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *CvssV2VulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *CvssV2VulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *CvssV2VulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *CvssV2VulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *CvssV2VulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *CvssV2VulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *CvssV2VulnAssessmentRelationship) GetName() string { - return o.Name -} -func (o *CvssV2VulnAssessmentRelationship) SetName(v string) { - o.Name = v -} -func (o *CvssV2VulnAssessmentRelationship) GetSummary() string { - return o.Summary -} -func (o *CvssV2VulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *CvssV2VulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *CvssV2VulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *CvssV2VulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *CvssV2VulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *CvssV2VulnAssessmentRelationship) GetEndTime() string { - return o.EndTime -} -func (o *CvssV2VulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *CvssV2VulnAssessmentRelationship) GetFrom() IElement { - return o.From -} -func (o *CvssV2VulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *CvssV2VulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *CvssV2VulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *CvssV2VulnAssessmentRelationship) GetStartTime() string { - return o.StartTime -} -func (o *CvssV2VulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *CvssV2VulnAssessmentRelationship) GetTo() []IElement { - return o.To -} -func (o *CvssV2VulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *CvssV2VulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *CvssV2VulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *CvssV2VulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement -} -func (o *CvssV2VulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v -} -func (o *CvssV2VulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *CvssV2VulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *CvssV2VulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime -} -func (o *CvssV2VulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *CvssV2VulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *CvssV2VulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -func (o *CvssV2VulnAssessmentRelationship) GetScore() float64 { - return o.Score -} -func (o *CvssV2VulnAssessmentRelationship) SetScore(v float64) { - o.Score = v -} -func (o *CvssV2VulnAssessmentRelationship) GetVectorString() string { - return o.VectorString -} -func (o *CvssV2VulnAssessmentRelationship) SetVectorString(v string) { - o.VectorString = v -} - -type ICvssV3VulnAssessmentRelationship interface { - IVulnAssessmentRelationship - - // GetScore provides a numerical (0-10) representation of the severity of a vulnerability. - GetScore() float64 - - SetScore(float64) - - // GetSeverity specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. - GetSeverity() CvssSeverityType - - SetSeverity(CvssSeverityType) - - // GetVectorString specifies the CVSS vector string for a vulnerability. - GetVectorString() string - - SetVectorString(string) -} - -type CvssV3VulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/CvssV3VulnAssessmentRelationship" iri-compact:"security_CvssV3VulnAssessmentRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` - - // Score provides a numerical (0-10) representation of the severity of a vulnerability. - Score float64 `iri:"https://spdx.org/rdf/3.0.0/terms/Security/score" iri-compact:"security_score"` - // Severity specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. - Severity CvssSeverityType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/severity" iri-compact:"security_severity"` - // VectorString specifies the CVSS vector string for a vulnerability. - VectorString string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vectorString" iri-compact:"security_vectorString"` -} - -func NewCvssV3VulnAssessmentRelationship() ICvssV3VulnAssessmentRelationship { - return &CvssV3VulnAssessmentRelationship{} -} - -func (o *CvssV3VulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *CvssV3VulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *CvssV3VulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *CvssV3VulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *CvssV3VulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *CvssV3VulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *CvssV3VulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *CvssV3VulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *CvssV3VulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *CvssV3VulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *CvssV3VulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *CvssV3VulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *CvssV3VulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *CvssV3VulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *CvssV3VulnAssessmentRelationship) GetName() string { - return o.Name -} -func (o *CvssV3VulnAssessmentRelationship) SetName(v string) { - o.Name = v -} -func (o *CvssV3VulnAssessmentRelationship) GetSummary() string { - return o.Summary -} -func (o *CvssV3VulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *CvssV3VulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *CvssV3VulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *CvssV3VulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *CvssV3VulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *CvssV3VulnAssessmentRelationship) GetEndTime() string { - return o.EndTime -} -func (o *CvssV3VulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *CvssV3VulnAssessmentRelationship) GetFrom() IElement { - return o.From -} -func (o *CvssV3VulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *CvssV3VulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *CvssV3VulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *CvssV3VulnAssessmentRelationship) GetStartTime() string { - return o.StartTime -} -func (o *CvssV3VulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *CvssV3VulnAssessmentRelationship) GetTo() []IElement { - return o.To -} -func (o *CvssV3VulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *CvssV3VulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *CvssV3VulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *CvssV3VulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement -} -func (o *CvssV3VulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v -} -func (o *CvssV3VulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *CvssV3VulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *CvssV3VulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime -} -func (o *CvssV3VulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *CvssV3VulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *CvssV3VulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -func (o *CvssV3VulnAssessmentRelationship) GetScore() float64 { - return o.Score -} -func (o *CvssV3VulnAssessmentRelationship) SetScore(v float64) { - o.Score = v -} -func (o *CvssV3VulnAssessmentRelationship) GetSeverity() CvssSeverityType { - return o.Severity -} -func (o *CvssV3VulnAssessmentRelationship) SetSeverity(v CvssSeverityType) { - o.Severity = v -} -func (o *CvssV3VulnAssessmentRelationship) GetVectorString() string { - return o.VectorString -} -func (o *CvssV3VulnAssessmentRelationship) SetVectorString(v string) { - o.VectorString = v -} - -type ICvssV4VulnAssessmentRelationship interface { - IVulnAssessmentRelationship - - // GetScore provides a numerical (0-10) representation of the severity of a vulnerability. - GetScore() float64 - - SetScore(float64) - - // GetSeverity specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. - GetSeverity() CvssSeverityType - - SetSeverity(CvssSeverityType) - - // GetVectorString specifies the CVSS vector string for a vulnerability. - GetVectorString() string - - SetVectorString(string) -} - -type CvssV4VulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/CvssV4VulnAssessmentRelationship" iri-compact:"security_CvssV4VulnAssessmentRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` - - // Score provides a numerical (0-10) representation of the severity of a vulnerability. - Score float64 `iri:"https://spdx.org/rdf/3.0.0/terms/Security/score" iri-compact:"security_score"` - // Severity specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. - Severity CvssSeverityType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/severity" iri-compact:"security_severity"` - // VectorString specifies the CVSS vector string for a vulnerability. - VectorString string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vectorString" iri-compact:"security_vectorString"` -} - -func NewCvssV4VulnAssessmentRelationship() ICvssV4VulnAssessmentRelationship { - return &CvssV4VulnAssessmentRelationship{} -} - -func (o *CvssV4VulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *CvssV4VulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *CvssV4VulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *CvssV4VulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *CvssV4VulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *CvssV4VulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *CvssV4VulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *CvssV4VulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *CvssV4VulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *CvssV4VulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *CvssV4VulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *CvssV4VulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *CvssV4VulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *CvssV4VulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *CvssV4VulnAssessmentRelationship) GetName() string { - return o.Name -} -func (o *CvssV4VulnAssessmentRelationship) SetName(v string) { - o.Name = v -} -func (o *CvssV4VulnAssessmentRelationship) GetSummary() string { - return o.Summary -} -func (o *CvssV4VulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *CvssV4VulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *CvssV4VulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *CvssV4VulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *CvssV4VulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *CvssV4VulnAssessmentRelationship) GetEndTime() string { - return o.EndTime -} -func (o *CvssV4VulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *CvssV4VulnAssessmentRelationship) GetFrom() IElement { - return o.From -} -func (o *CvssV4VulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *CvssV4VulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *CvssV4VulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *CvssV4VulnAssessmentRelationship) GetStartTime() string { - return o.StartTime -} -func (o *CvssV4VulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *CvssV4VulnAssessmentRelationship) GetTo() []IElement { - return o.To -} -func (o *CvssV4VulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *CvssV4VulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *CvssV4VulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *CvssV4VulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement -} -func (o *CvssV4VulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v -} -func (o *CvssV4VulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *CvssV4VulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *CvssV4VulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime -} -func (o *CvssV4VulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *CvssV4VulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *CvssV4VulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -func (o *CvssV4VulnAssessmentRelationship) GetScore() float64 { - return o.Score -} -func (o *CvssV4VulnAssessmentRelationship) SetScore(v float64) { - o.Score = v -} -func (o *CvssV4VulnAssessmentRelationship) GetSeverity() CvssSeverityType { - return o.Severity -} -func (o *CvssV4VulnAssessmentRelationship) SetSeverity(v CvssSeverityType) { - o.Severity = v -} -func (o *CvssV4VulnAssessmentRelationship) GetVectorString() string { - return o.VectorString -} -func (o *CvssV4VulnAssessmentRelationship) SetVectorString(v string) { - o.VectorString = v -} - -type IEpssVulnAssessmentRelationship interface { - IVulnAssessmentRelationship - - // GetPercentile the percentile of the current probability score. - GetPercentile() float64 - - SetPercentile(float64) - - // GetProbability a probability score between 0 and 1 of a vulnerability being exploited. - GetProbability() float64 - - SetProbability(float64) -} - -type EpssVulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/EpssVulnAssessmentRelationship" iri-compact:"security_EpssVulnAssessmentRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` - - // Percentile the percentile of the current probability score. - Percentile float64 `iri:"https://spdx.org/rdf/3.0.0/terms/Security/percentile" iri-compact:"security_percentile"` - // Probability a probability score between 0 and 1 of a vulnerability being exploited. - Probability float64 `iri:"https://spdx.org/rdf/3.0.0/terms/Security/probability" iri-compact:"security_probability"` -} - -func NewEpssVulnAssessmentRelationship() IEpssVulnAssessmentRelationship { - return &EpssVulnAssessmentRelationship{} -} - -func (o *EpssVulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *EpssVulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *EpssVulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *EpssVulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *EpssVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *EpssVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *EpssVulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *EpssVulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *EpssVulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *EpssVulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *EpssVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *EpssVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *EpssVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *EpssVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *EpssVulnAssessmentRelationship) GetName() string { - return o.Name -} -func (o *EpssVulnAssessmentRelationship) SetName(v string) { - o.Name = v -} -func (o *EpssVulnAssessmentRelationship) GetSummary() string { - return o.Summary -} -func (o *EpssVulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *EpssVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *EpssVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *EpssVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *EpssVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *EpssVulnAssessmentRelationship) GetEndTime() string { - return o.EndTime -} -func (o *EpssVulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *EpssVulnAssessmentRelationship) GetFrom() IElement { - return o.From -} -func (o *EpssVulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *EpssVulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *EpssVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *EpssVulnAssessmentRelationship) GetStartTime() string { - return o.StartTime -} -func (o *EpssVulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *EpssVulnAssessmentRelationship) GetTo() []IElement { - return o.To -} -func (o *EpssVulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *EpssVulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *EpssVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *EpssVulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement -} -func (o *EpssVulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v -} -func (o *EpssVulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *EpssVulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *EpssVulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime -} -func (o *EpssVulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *EpssVulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *EpssVulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -func (o *EpssVulnAssessmentRelationship) GetPercentile() float64 { - return o.Percentile -} -func (o *EpssVulnAssessmentRelationship) SetPercentile(v float64) { - o.Percentile = v -} -func (o *EpssVulnAssessmentRelationship) GetProbability() float64 { - return o.Probability -} -func (o *EpssVulnAssessmentRelationship) SetProbability(v float64) { - o.Probability = v -} - -type IExploitCatalogVulnAssessmentRelationship interface { - IVulnAssessmentRelationship - - // GetCatalogType specifies the exploit catalog type. - GetCatalogType() ExploitCatalogType - - SetCatalogType(ExploitCatalogType) - - // GetExploited describe that a CVE is known to have an exploit because it's been listed in an exploit catalog. - GetExploited() bool - - SetExploited(bool) - - // GetLocator provides the location of an exploit catalog. - GetLocator() string - - SetLocator(string) -} - -type ExploitCatalogVulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogVulnAssessmentRelationship" iri-compact:"security_ExploitCatalogVulnAssessmentRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` - - // CatalogType specifies the exploit catalog type. - CatalogType ExploitCatalogType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/catalogType" iri-compact:"security_catalogType"` - // Exploited describe that a CVE is known to have an exploit because it's been listed in an exploit catalog. - Exploited bool `iri:"https://spdx.org/rdf/3.0.0/terms/Security/exploited" iri-compact:"security_exploited"` - // Locator provides the location of an exploit catalog. - Locator string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/locator" iri-compact:"security_locator"` -} - -func NewExploitCatalogVulnAssessmentRelationship() IExploitCatalogVulnAssessmentRelationship { - return &ExploitCatalogVulnAssessmentRelationship{} -} - -func (o *ExploitCatalogVulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetName() string { - return o.Name -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetName(v string) { - o.Name = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetSummary() string { - return o.Summary -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *ExploitCatalogVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetEndTime() string { - return o.EndTime -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetFrom() IElement { - return o.From -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetStartTime() string { - return o.StartTime -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetTo() []IElement { - return o.To -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *ExploitCatalogVulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -func (o *ExploitCatalogVulnAssessmentRelationship) GetCatalogType() ExploitCatalogType { - return o.CatalogType -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetCatalogType(v ExploitCatalogType) { - o.CatalogType = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetExploited() bool { - return o.Exploited -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetExploited(v bool) { - o.Exploited = v -} -func (o *ExploitCatalogVulnAssessmentRelationship) GetLocator() string { - return o.Locator -} -func (o *ExploitCatalogVulnAssessmentRelationship) SetLocator(v string) { - o.Locator = v -} - -type ISsvcVulnAssessmentRelationship interface { - IVulnAssessmentRelationship - - // GetDecisionType provide the enumeration of possible decisions in the Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree [https://www.cisa.gov/sites/default/files/publications/cisa-ssvc-guide%20508c.pdf](https://www.cisa.gov/sites/default/files/publications/cisa-ssvc-guide%20508c.pdf) - GetDecisionType() SsvcDecisionType - - SetDecisionType(SsvcDecisionType) -} - -type SsvcVulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/SsvcVulnAssessmentRelationship" iri-compact:"security_SsvcVulnAssessmentRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` - - // DecisionType provide the enumeration of possible decisions in the Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree [https://www.cisa.gov/sites/default/files/publications/cisa-ssvc-guide%20508c.pdf](https://www.cisa.gov/sites/default/files/publications/cisa-ssvc-guide%20508c.pdf) - DecisionType SsvcDecisionType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/decisionType" iri-compact:"security_decisionType"` -} - -func NewSsvcVulnAssessmentRelationship() ISsvcVulnAssessmentRelationship { - return &SsvcVulnAssessmentRelationship{} -} - -func (o *SsvcVulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *SsvcVulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *SsvcVulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *SsvcVulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *SsvcVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *SsvcVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *SsvcVulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *SsvcVulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *SsvcVulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *SsvcVulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *SsvcVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *SsvcVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *SsvcVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *SsvcVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *SsvcVulnAssessmentRelationship) GetName() string { - return o.Name -} -func (o *SsvcVulnAssessmentRelationship) SetName(v string) { - o.Name = v -} -func (o *SsvcVulnAssessmentRelationship) GetSummary() string { - return o.Summary -} -func (o *SsvcVulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *SsvcVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *SsvcVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *SsvcVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *SsvcVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *SsvcVulnAssessmentRelationship) GetEndTime() string { - return o.EndTime -} -func (o *SsvcVulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *SsvcVulnAssessmentRelationship) GetFrom() IElement { - return o.From -} -func (o *SsvcVulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *SsvcVulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *SsvcVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *SsvcVulnAssessmentRelationship) GetStartTime() string { - return o.StartTime -} -func (o *SsvcVulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *SsvcVulnAssessmentRelationship) GetTo() []IElement { - return o.To -} -func (o *SsvcVulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *SsvcVulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *SsvcVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *SsvcVulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement -} -func (o *SsvcVulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v -} -func (o *SsvcVulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *SsvcVulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *SsvcVulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime -} -func (o *SsvcVulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *SsvcVulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *SsvcVulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -func (o *SsvcVulnAssessmentRelationship) GetDecisionType() SsvcDecisionType { - return o.DecisionType -} -func (o *SsvcVulnAssessmentRelationship) SetDecisionType(v SsvcDecisionType) { - o.DecisionType = v -} - -type IVexVulnAssessmentRelationship interface { - IVulnAssessmentRelationship - - // GetStatusNotes conveys information about how VEX status was determined. - GetStatusNotes() string - - SetStatusNotes(string) - - // GetVexVersion specifies the version of a VEX statement. - GetVexVersion() string - - SetVexVersion(string) -} - -type VexVulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexVulnAssessmentRelationship" iri-compact:"security_VexVulnAssessmentRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` - - // StatusNotes conveys information about how VEX status was determined. - StatusNotes string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/statusNotes" iri-compact:"security_statusNotes"` - // VexVersion specifies the version of a VEX statement. - VexVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vexVersion" iri-compact:"security_vexVersion"` -} - -func (o *VexVulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *VexVulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *VexVulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *VexVulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *VexVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *VexVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *VexVulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *VexVulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *VexVulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *VexVulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *VexVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *VexVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *VexVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *VexVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *VexVulnAssessmentRelationship) GetName() string { - return o.Name -} -func (o *VexVulnAssessmentRelationship) SetName(v string) { - o.Name = v -} -func (o *VexVulnAssessmentRelationship) GetSummary() string { - return o.Summary -} -func (o *VexVulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *VexVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *VexVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *VexVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *VexVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *VexVulnAssessmentRelationship) GetEndTime() string { - return o.EndTime -} -func (o *VexVulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *VexVulnAssessmentRelationship) GetFrom() IElement { - return o.From -} -func (o *VexVulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *VexVulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *VexVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *VexVulnAssessmentRelationship) GetStartTime() string { - return o.StartTime -} -func (o *VexVulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *VexVulnAssessmentRelationship) GetTo() []IElement { - return o.To -} -func (o *VexVulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *VexVulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *VexVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *VexVulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement -} -func (o *VexVulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v -} -func (o *VexVulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *VexVulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *VexVulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime -} -func (o *VexVulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *VexVulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *VexVulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -func (o *VexVulnAssessmentRelationship) GetStatusNotes() string { - return o.StatusNotes -} -func (o *VexVulnAssessmentRelationship) SetStatusNotes(v string) { - o.StatusNotes = v -} -func (o *VexVulnAssessmentRelationship) GetVexVersion() string { - return o.VexVersion -} -func (o *VexVulnAssessmentRelationship) SetVexVersion(v string) { - o.VexVersion = v -} - -type IVulnerability interface { - IArtifact - - // GetModifiedTime specifies a time when a vulnerability assessment was modified - GetModifiedTime() string - - SetModifiedTime(string) - - // GetPublishedTime specifies the time when a vulnerability was published. - GetPublishedTime() string - - SetPublishedTime(string) - - // GetWithdrawnTime specified the time and date when a vulnerability was withdrawn. - GetWithdrawnTime() string - - SetWithdrawnTime(string) -} - -type Vulnerability struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/Vulnerability" iri-compact:"security_Vulnerability" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // BuiltTime specifies the time an artifact was built. - BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` - // OriginatedBy identifies from where or whom the Element originally came. - OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` - // ReleaseTime specifies the time an artifact was released. - ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` - // StandardName the name of a relevant standard that may apply to an artifact. - StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // SupportLevel specifies the level of support associated with an artifact. - SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` - // ValidUntilTime specifies until when the artifact can be used before its usage needs to be - // reassessed. - ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` - - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` -} - -func NewVulnerability() IVulnerability { - return &Vulnerability{} -} - -func (o *Vulnerability) GetSpdxId() string { - return o.SpdxId -} -func (o *Vulnerability) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Vulnerability) GetComment() string { - return o.Comment -} -func (o *Vulnerability) SetComment(v string) { - o.Comment = v -} -func (o *Vulnerability) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Vulnerability) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *Vulnerability) GetDescription() string { - return o.Description -} -func (o *Vulnerability) SetDescription(v string) { - o.Description = v -} -func (o *Vulnerability) GetExtensions() []IExtension { - return o.Extensions -} -func (o *Vulnerability) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *Vulnerability) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *Vulnerability) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *Vulnerability) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *Vulnerability) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *Vulnerability) GetName() string { - return o.Name -} -func (o *Vulnerability) SetName(v string) { - o.Name = v -} -func (o *Vulnerability) GetSummary() string { - return o.Summary -} -func (o *Vulnerability) SetSummary(v string) { - o.Summary = v -} -func (o *Vulnerability) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *Vulnerability) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *Vulnerability) GetBuiltTime() string { - return o.BuiltTime -} -func (o *Vulnerability) SetBuiltTime(v string) { - o.BuiltTime = v -} -func (o *Vulnerability) GetOriginatedBy() []IAgent { - return o.OriginatedBy -} -func (o *Vulnerability) SetOriginatedBy(v ...IAgent) { - o.OriginatedBy = v -} -func (o *Vulnerability) GetReleaseTime() string { - return o.ReleaseTime -} -func (o *Vulnerability) SetReleaseTime(v string) { - o.ReleaseTime = v -} -func (o *Vulnerability) GetStandardName() []string { - return o.StandardName -} -func (o *Vulnerability) SetStandardName(v ...string) { - o.StandardName = v -} -func (o *Vulnerability) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *Vulnerability) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *Vulnerability) GetSupportLevel() []SupportType { - return o.SupportLevel -} -func (o *Vulnerability) SetSupportLevel(v ...SupportType) { - o.SupportLevel = v -} -func (o *Vulnerability) GetValidUntilTime() string { - return o.ValidUntilTime -} -func (o *Vulnerability) SetValidUntilTime(v string) { - o.ValidUntilTime = v -} - -func (o *Vulnerability) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *Vulnerability) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *Vulnerability) GetPublishedTime() string { - return o.PublishedTime -} -func (o *Vulnerability) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *Vulnerability) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *Vulnerability) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -type ISoftwareArtifact interface { - IArtifact - - // GetAdditionalPurpose provides additional purpose information of the software artifact. - GetAdditionalPurpose() []SoftwarePurpose - - SetAdditionalPurpose(...SoftwarePurpose) - - // GetAttributionText provides a place for the SPDX data creator to record acknowledgement text for - // a software Package, File or Snippet. - GetAttributionText() []string - - SetAttributionText(...string) - - // GetContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be - // used for verifying its identity and/or integrity. - GetContentIdentifier() []IContentIdentifier - - SetContentIdentifier(...IContentIdentifier) - - // GetCopyrightText identifies the text of one or more copyright notices for a software Package, - // File or Snippet, if any. - GetCopyrightText() string - - SetCopyrightText(string) - - // GetPrimaryPurpose provides information about the primary purpose of the software artifact. - GetPrimaryPurpose() SoftwarePurpose - - SetPrimaryPurpose(SoftwarePurpose) -} - -type SoftwareArtifact struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/SoftwareArtifact" iri-compact:"software_SoftwareArtifact" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // BuiltTime specifies the time an artifact was built. - BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` - // OriginatedBy identifies from where or whom the Element originally came. - OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` - // ReleaseTime specifies the time an artifact was released. - ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` - // StandardName the name of a relevant standard that may apply to an artifact. - StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // SupportLevel specifies the level of support associated with an artifact. - SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` - // ValidUntilTime specifies until when the artifact can be used before its usage needs to be - // reassessed. - ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` - - // AdditionalPurpose provides additional purpose information of the software artifact. - AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` - // AttributionText provides a place for the SPDX data creator to record acknowledgement text for - // a software Package, File or Snippet. - AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` - // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be - // used for verifying its identity and/or integrity. - ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` - // CopyrightText identifies the text of one or more copyright notices for a software Package, - // File or Snippet, if any. - CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` - // PrimaryPurpose provides information about the primary purpose of the software artifact. - PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` -} - -func (o *SoftwareArtifact) GetSpdxId() string { - return o.SpdxId -} -func (o *SoftwareArtifact) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *SoftwareArtifact) GetComment() string { - return o.Comment -} -func (o *SoftwareArtifact) SetComment(v string) { - o.Comment = v -} -func (o *SoftwareArtifact) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *SoftwareArtifact) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *SoftwareArtifact) GetDescription() string { - return o.Description -} -func (o *SoftwareArtifact) SetDescription(v string) { - o.Description = v -} -func (o *SoftwareArtifact) GetExtensions() []IExtension { - return o.Extensions -} -func (o *SoftwareArtifact) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *SoftwareArtifact) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *SoftwareArtifact) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *SoftwareArtifact) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *SoftwareArtifact) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *SoftwareArtifact) GetName() string { - return o.Name -} -func (o *SoftwareArtifact) SetName(v string) { - o.Name = v -} -func (o *SoftwareArtifact) GetSummary() string { - return o.Summary -} -func (o *SoftwareArtifact) SetSummary(v string) { - o.Summary = v -} -func (o *SoftwareArtifact) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *SoftwareArtifact) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *SoftwareArtifact) GetBuiltTime() string { - return o.BuiltTime -} -func (o *SoftwareArtifact) SetBuiltTime(v string) { - o.BuiltTime = v -} -func (o *SoftwareArtifact) GetOriginatedBy() []IAgent { - return o.OriginatedBy -} -func (o *SoftwareArtifact) SetOriginatedBy(v ...IAgent) { - o.OriginatedBy = v -} -func (o *SoftwareArtifact) GetReleaseTime() string { - return o.ReleaseTime -} -func (o *SoftwareArtifact) SetReleaseTime(v string) { - o.ReleaseTime = v -} -func (o *SoftwareArtifact) GetStandardName() []string { - return o.StandardName -} -func (o *SoftwareArtifact) SetStandardName(v ...string) { - o.StandardName = v -} -func (o *SoftwareArtifact) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *SoftwareArtifact) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *SoftwareArtifact) GetSupportLevel() []SupportType { - return o.SupportLevel -} -func (o *SoftwareArtifact) SetSupportLevel(v ...SupportType) { - o.SupportLevel = v -} -func (o *SoftwareArtifact) GetValidUntilTime() string { - return o.ValidUntilTime -} -func (o *SoftwareArtifact) SetValidUntilTime(v string) { - o.ValidUntilTime = v -} - -func (o *SoftwareArtifact) GetAdditionalPurpose() []SoftwarePurpose { - return o.AdditionalPurpose -} -func (o *SoftwareArtifact) SetAdditionalPurpose(v ...SoftwarePurpose) { - o.AdditionalPurpose = v -} -func (o *SoftwareArtifact) GetAttributionText() []string { - return o.AttributionText -} -func (o *SoftwareArtifact) SetAttributionText(v ...string) { - o.AttributionText = v -} -func (o *SoftwareArtifact) GetContentIdentifier() []IContentIdentifier { - return o.ContentIdentifier -} -func (o *SoftwareArtifact) SetContentIdentifier(v ...IContentIdentifier) { - o.ContentIdentifier = v -} -func (o *SoftwareArtifact) GetCopyrightText() string { - return o.CopyrightText -} -func (o *SoftwareArtifact) SetCopyrightText(v string) { - o.CopyrightText = v -} -func (o *SoftwareArtifact) GetPrimaryPurpose() SoftwarePurpose { - return o.PrimaryPurpose -} -func (o *SoftwareArtifact) SetPrimaryPurpose(v SoftwarePurpose) { - o.PrimaryPurpose = v -} - -type IBom interface { - IBundle -} - -type Bom struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/Bom" iri-compact:"Bom" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Elements refers to one or more Elements that are part of an ElementCollection. - Elements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/element" iri-compact:"element"` - // ProfileConformance describes one a profile which the creator of this ElementCollection intends to - // conform to. - ProfileConformance []ProfileIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/profileConformance" iri-compact:"profileConformance"` - // RootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. - RootElements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/rootElement" iri-compact:"rootElement"` - - // Context gives information about the circumstances or unifying properties - // that Elements of the bundle have been assembled under. - Context string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/context" iri-compact:"context"` -} - -func NewBom() IBom { - return &Bom{} -} - -func (o *Bom) GetSpdxId() string { - return o.SpdxId -} -func (o *Bom) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Bom) GetComment() string { - return o.Comment -} -func (o *Bom) SetComment(v string) { - o.Comment = v -} -func (o *Bom) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Bom) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *Bom) GetDescription() string { - return o.Description -} -func (o *Bom) SetDescription(v string) { - o.Description = v -} -func (o *Bom) GetExtensions() []IExtension { - return o.Extensions -} -func (o *Bom) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *Bom) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *Bom) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *Bom) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *Bom) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *Bom) GetName() string { - return o.Name -} -func (o *Bom) SetName(v string) { - o.Name = v -} -func (o *Bom) GetSummary() string { - return o.Summary -} -func (o *Bom) SetSummary(v string) { - o.Summary = v -} -func (o *Bom) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *Bom) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *Bom) GetElements() []IElement { - return o.Elements -} -func (o *Bom) SetElements(v ...IElement) { - o.Elements = v -} -func (o *Bom) GetProfileConformance() []ProfileIdentifierType { - return o.ProfileConformance -} -func (o *Bom) SetProfileConformance(v ...ProfileIdentifierType) { - o.ProfileConformance = v -} -func (o *Bom) GetRootElements() []IElement { - return o.RootElements -} -func (o *Bom) SetRootElements(v ...IElement) { - o.RootElements = v -} - -func (o *Bom) GetContext() string { - return o.Context -} -func (o *Bom) SetContext(v string) { - o.Context = v -} - -type ICustomLicense interface { - ILicense -} - -type CustomLicense struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/CustomLicense" iri-compact:"expandedlicensing_CustomLicense" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // IsDeprecatedLicenseId specifies whether a license or additional text identifier has been marked as - // deprecated. - IsDeprecatedLicenseId bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isDeprecatedLicenseId" iri-compact:"expandedlicensing_isDeprecatedLicenseId"` - // IsFsfLibre specifies whether the License is listed as free by the - // [Free Software Foundation (FSF)](https://fsf.org). - IsFsfLibre bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isFsfLibre" iri-compact:"expandedlicensing_isFsfLibre"` - // IsOsiApproved specifies whether the License is listed as approved by the - // [Open Source Initiative (OSI)](https://opensource.org). - IsOsiApproved bool `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/isOsiApproved" iri-compact:"expandedlicensing_isOsiApproved"` - // LicenseXml identifies all the text and metadata associated with a license in the license - // XML format. - LicenseXml string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` - // ObsoletedBy specifies the licenseId that is preferred to be used in place of a deprecated - // License or LicenseAddition. - ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` - // SeeAlso contains a URL where the License or LicenseAddition can be found in use. - SeeAlso []string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` - // StandardLicenseHeader provides a License author's preferred text to indicate that a file is covered - // by the License. - StandardLicenseHeader string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseHeader" iri-compact:"expandedlicensing_standardLicenseHeader"` - // StandardLicenseTemplate identifies the full text of a License, in SPDX templating format. - StandardLicenseTemplate string `iri:"https://spdx.org/rdf/3.0.0/terms/ExpandedLicensing/standardLicenseTemplate" iri-compact:"expandedlicensing_standardLicenseTemplate"` - // LicenseText identifies the full text of a License or Addition. - LicenseText string `iri:"https://spdx.org/rdf/3.0.0/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` -} - -func NewCustomLicense() ICustomLicense { - return &CustomLicense{} -} - -func (o *CustomLicense) GetSpdxId() string { - return o.SpdxId -} -func (o *CustomLicense) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *CustomLicense) GetComment() string { - return o.Comment -} -func (o *CustomLicense) SetComment(v string) { - o.Comment = v -} -func (o *CustomLicense) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *CustomLicense) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *CustomLicense) GetDescription() string { - return o.Description -} -func (o *CustomLicense) SetDescription(v string) { - o.Description = v -} -func (o *CustomLicense) GetExtensions() []IExtension { - return o.Extensions -} -func (o *CustomLicense) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *CustomLicense) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *CustomLicense) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *CustomLicense) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *CustomLicense) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *CustomLicense) GetName() string { - return o.Name -} -func (o *CustomLicense) SetName(v string) { - o.Name = v -} -func (o *CustomLicense) GetSummary() string { - return o.Summary -} -func (o *CustomLicense) SetSummary(v string) { - o.Summary = v -} -func (o *CustomLicense) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *CustomLicense) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *CustomLicense) GetIsDeprecatedLicenseId() bool { - return o.IsDeprecatedLicenseId -} -func (o *CustomLicense) SetIsDeprecatedLicenseId(v bool) { - o.IsDeprecatedLicenseId = v -} -func (o *CustomLicense) GetIsFsfLibre() bool { - return o.IsFsfLibre -} -func (o *CustomLicense) SetIsFsfLibre(v bool) { - o.IsFsfLibre = v -} -func (o *CustomLicense) GetIsOsiApproved() bool { - return o.IsOsiApproved -} -func (o *CustomLicense) SetIsOsiApproved(v bool) { - o.IsOsiApproved = v -} -func (o *CustomLicense) GetLicenseXml() string { - return o.LicenseXml -} -func (o *CustomLicense) SetLicenseXml(v string) { - o.LicenseXml = v -} -func (o *CustomLicense) GetObsoletedBy() string { - return o.ObsoletedBy -} -func (o *CustomLicense) SetObsoletedBy(v string) { - o.ObsoletedBy = v -} -func (o *CustomLicense) GetSeeAlso() []string { - return o.SeeAlso -} -func (o *CustomLicense) SetSeeAlso(v ...string) { - o.SeeAlso = v -} -func (o *CustomLicense) GetStandardLicenseHeader() string { - return o.StandardLicenseHeader -} -func (o *CustomLicense) SetStandardLicenseHeader(v string) { - o.StandardLicenseHeader = v -} -func (o *CustomLicense) GetStandardLicenseTemplate() string { - return o.StandardLicenseTemplate -} -func (o *CustomLicense) SetStandardLicenseTemplate(v string) { - o.StandardLicenseTemplate = v -} -func (o *CustomLicense) GetLicenseText() string { - return o.LicenseText -} -func (o *CustomLicense) SetLicenseText(v string) { - o.LicenseText = v -} - -type IVexAffectedVulnAssessmentRelationship interface { - IVexVulnAssessmentRelationship - - // GetActionStatement provides advise on how to mitigate or remediate a vulnerability when a VEX product - // is affected by it. - GetActionStatement() string - - SetActionStatement(string) - - // GetActionStatementTime records the time when a recommended action was communicated in a VEX statement - // to mitigate a vulnerability. - GetActionStatementTime() []string - - SetActionStatementTime(...string) -} - -type VexAffectedVulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexAffectedVulnAssessmentRelationship" iri-compact:"security_VexAffectedVulnAssessmentRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` - - // StatusNotes conveys information about how VEX status was determined. - StatusNotes string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/statusNotes" iri-compact:"security_statusNotes"` - // VexVersion specifies the version of a VEX statement. - VexVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vexVersion" iri-compact:"security_vexVersion"` - - // ActionStatement provides advise on how to mitigate or remediate a vulnerability when a VEX product - // is affected by it. - ActionStatement string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/actionStatement" iri-compact:"security_actionStatement"` - // ActionStatementTime records the time when a recommended action was communicated in a VEX statement - // to mitigate a vulnerability. - ActionStatementTime []string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/actionStatementTime" iri-compact:"security_actionStatementTime"` -} - -func NewVexAffectedVulnAssessmentRelationship() IVexAffectedVulnAssessmentRelationship { - return &VexAffectedVulnAssessmentRelationship{} -} - -func (o *VexAffectedVulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *VexAffectedVulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *VexAffectedVulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *VexAffectedVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *VexAffectedVulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *VexAffectedVulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *VexAffectedVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *VexAffectedVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetName() string { - return o.Name -} -func (o *VexAffectedVulnAssessmentRelationship) SetName(v string) { - o.Name = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetSummary() string { - return o.Summary -} -func (o *VexAffectedVulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *VexAffectedVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *VexAffectedVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *VexAffectedVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetEndTime() string { - return o.EndTime -} -func (o *VexAffectedVulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetFrom() IElement { - return o.From -} -func (o *VexAffectedVulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *VexAffectedVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetStartTime() string { - return o.StartTime -} -func (o *VexAffectedVulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetTo() []IElement { - return o.To -} -func (o *VexAffectedVulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *VexAffectedVulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *VexAffectedVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement -} -func (o *VexAffectedVulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *VexAffectedVulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime -} -func (o *VexAffectedVulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *VexAffectedVulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -func (o *VexAffectedVulnAssessmentRelationship) GetStatusNotes() string { - return o.StatusNotes -} -func (o *VexAffectedVulnAssessmentRelationship) SetStatusNotes(v string) { - o.StatusNotes = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetVexVersion() string { - return o.VexVersion -} -func (o *VexAffectedVulnAssessmentRelationship) SetVexVersion(v string) { - o.VexVersion = v -} - -func (o *VexAffectedVulnAssessmentRelationship) GetActionStatement() string { - return o.ActionStatement -} -func (o *VexAffectedVulnAssessmentRelationship) SetActionStatement(v string) { - o.ActionStatement = v -} -func (o *VexAffectedVulnAssessmentRelationship) GetActionStatementTime() []string { - return o.ActionStatementTime -} -func (o *VexAffectedVulnAssessmentRelationship) SetActionStatementTime(v ...string) { - o.ActionStatementTime = v -} - -type IVexFixedVulnAssessmentRelationship interface { - IVexVulnAssessmentRelationship -} - -type VexFixedVulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexFixedVulnAssessmentRelationship" iri-compact:"security_VexFixedVulnAssessmentRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` - - // StatusNotes conveys information about how VEX status was determined. - StatusNotes string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/statusNotes" iri-compact:"security_statusNotes"` - // VexVersion specifies the version of a VEX statement. - VexVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vexVersion" iri-compact:"security_vexVersion"` -} - -func NewVexFixedVulnAssessmentRelationship() IVexFixedVulnAssessmentRelationship { - return &VexFixedVulnAssessmentRelationship{} -} - -func (o *VexFixedVulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *VexFixedVulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *VexFixedVulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *VexFixedVulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *VexFixedVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *VexFixedVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *VexFixedVulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *VexFixedVulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *VexFixedVulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *VexFixedVulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *VexFixedVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *VexFixedVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *VexFixedVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *VexFixedVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *VexFixedVulnAssessmentRelationship) GetName() string { - return o.Name -} -func (o *VexFixedVulnAssessmentRelationship) SetName(v string) { - o.Name = v -} -func (o *VexFixedVulnAssessmentRelationship) GetSummary() string { - return o.Summary -} -func (o *VexFixedVulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *VexFixedVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *VexFixedVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *VexFixedVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *VexFixedVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *VexFixedVulnAssessmentRelationship) GetEndTime() string { - return o.EndTime -} -func (o *VexFixedVulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *VexFixedVulnAssessmentRelationship) GetFrom() IElement { - return o.From -} -func (o *VexFixedVulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *VexFixedVulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *VexFixedVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *VexFixedVulnAssessmentRelationship) GetStartTime() string { - return o.StartTime -} -func (o *VexFixedVulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *VexFixedVulnAssessmentRelationship) GetTo() []IElement { - return o.To -} -func (o *VexFixedVulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *VexFixedVulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *VexFixedVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *VexFixedVulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement -} -func (o *VexFixedVulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v -} -func (o *VexFixedVulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *VexFixedVulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *VexFixedVulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime -} -func (o *VexFixedVulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *VexFixedVulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *VexFixedVulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -func (o *VexFixedVulnAssessmentRelationship) GetStatusNotes() string { - return o.StatusNotes -} -func (o *VexFixedVulnAssessmentRelationship) SetStatusNotes(v string) { - o.StatusNotes = v -} -func (o *VexFixedVulnAssessmentRelationship) GetVexVersion() string { - return o.VexVersion -} -func (o *VexFixedVulnAssessmentRelationship) SetVexVersion(v string) { - o.VexVersion = v -} - -type IVexNotAffectedVulnAssessmentRelationship interface { - IVexVulnAssessmentRelationship - - // GetImpactStatement explains why a VEX product is not affected by a vulnerability. It is an - // alternative in VexNotAffectedVulnAssessmentRelationship to the machine-readable - // justification label. - GetImpactStatement() string - - SetImpactStatement(string) - - // GetImpactStatementTime timestamp of impact statement. - GetImpactStatementTime() string - - SetImpactStatementTime(string) - - // GetJustificationType impact justification label to be used when linking a vulnerability to an element - // representing a VEX product with a VexNotAffectedVulnAssessmentRelationship - // relationship. - GetJustificationType() VexJustificationType - - SetJustificationType(VexJustificationType) -} - -type VexNotAffectedVulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexNotAffectedVulnAssessmentRelationship" iri-compact:"security_VexNotAffectedVulnAssessmentRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` - - // StatusNotes conveys information about how VEX status was determined. - StatusNotes string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/statusNotes" iri-compact:"security_statusNotes"` - // VexVersion specifies the version of a VEX statement. - VexVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vexVersion" iri-compact:"security_vexVersion"` - - // ImpactStatement explains why a VEX product is not affected by a vulnerability. It is an - // alternative in VexNotAffectedVulnAssessmentRelationship to the machine-readable - // justification label. - ImpactStatement string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/impactStatement" iri-compact:"security_impactStatement"` - // ImpactStatementTime timestamp of impact statement. - ImpactStatementTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/impactStatementTime" iri-compact:"security_impactStatementTime"` - // JustificationType impact justification label to be used when linking a vulnerability to an element - // representing a VEX product with a VexNotAffectedVulnAssessmentRelationship - // relationship. - JustificationType VexJustificationType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/justificationType" iri-compact:"security_justificationType"` -} - -func NewVexNotAffectedVulnAssessmentRelationship() IVexNotAffectedVulnAssessmentRelationship { - return &VexNotAffectedVulnAssessmentRelationship{} -} - -func (o *VexNotAffectedVulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetName() string { - return o.Name -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetName(v string) { - o.Name = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetSummary() string { - return o.Summary -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *VexNotAffectedVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetEndTime() string { - return o.EndTime -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetFrom() IElement { - return o.From -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetStartTime() string { - return o.StartTime -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetTo() []IElement { - return o.To -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *VexNotAffectedVulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -func (o *VexNotAffectedVulnAssessmentRelationship) GetStatusNotes() string { - return o.StatusNotes -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetStatusNotes(v string) { - o.StatusNotes = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetVexVersion() string { - return o.VexVersion -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetVexVersion(v string) { - o.VexVersion = v -} - -func (o *VexNotAffectedVulnAssessmentRelationship) GetImpactStatement() string { - return o.ImpactStatement -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetImpactStatement(v string) { - o.ImpactStatement = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetImpactStatementTime() string { - return o.ImpactStatementTime -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetImpactStatementTime(v string) { - o.ImpactStatementTime = v -} -func (o *VexNotAffectedVulnAssessmentRelationship) GetJustificationType() VexJustificationType { - return o.JustificationType -} -func (o *VexNotAffectedVulnAssessmentRelationship) SetJustificationType(v VexJustificationType) { - o.JustificationType = v -} - -type IVexUnderInvestigationVulnAssessmentRelationship interface { - IVexVulnAssessmentRelationship -} - -type VexUnderInvestigationVulnAssessmentRelationship struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Security/VexUnderInvestigationVulnAssessmentRelationship" iri-compact:"security_VexUnderInvestigationVulnAssessmentRelationship" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Completeness provides information about the completeness of relationships. - Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.0/terms/Core/completeness" iri-compact:"completeness"` - // EndTime specifies the time from which an element is no longer applicable / valid. - EndTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/endTime" iri-compact:"endTime"` - // From references the Element on the left-hand side of a relationship. - From IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/from" iri-compact:"from"` - // RelationshipType information about the relationship between two Elements. - RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/relationshipType" iri-compact:"relationshipType"` - // StartTime specifies the time from which an element is applicable / valid. - StartTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/startTime" iri-compact:"startTime"` - // To references an Element on the right-hand side of a relationship. - To []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/to" iri-compact:"to"` - - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // AssessedElement specifies an Element contained in a piece of software where a vulnerability was - // found. - AssessedElement IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Security/assessedElement" iri-compact:"security_assessedElement"` - // ModifiedTime specifies a time when a vulnerability assessment was modified - ModifiedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // PublishedTime specifies the time when a vulnerability was published. - PublishedTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // WithdrawnTime specified the time and date when a vulnerability was withdrawn. - WithdrawnTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` - - // StatusNotes conveys information about how VEX status was determined. - StatusNotes string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/statusNotes" iri-compact:"security_statusNotes"` - // VexVersion specifies the version of a VEX statement. - VexVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Security/vexVersion" iri-compact:"security_vexVersion"` -} - -func NewVexUnderInvestigationVulnAssessmentRelationship() IVexUnderInvestigationVulnAssessmentRelationship { - return &VexUnderInvestigationVulnAssessmentRelationship{} -} - -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetSpdxId() string { - return o.SpdxId -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetComment() string { - return o.Comment -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetComment(v string) { - o.Comment = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetDescription() string { - return o.Description -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetDescription(v string) { - o.Description = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetExtensions() []IExtension { - return o.Extensions -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetName() string { - return o.Name -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetName(v string) { - o.Name = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetSummary() string { - return o.Summary -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetSummary(v string) { - o.Summary = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetCompleteness() RelationshipCompleteness { - return o.Completeness -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetCompleteness(v RelationshipCompleteness) { - o.Completeness = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetEndTime() string { - return o.EndTime -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetEndTime(v string) { - o.EndTime = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetFrom() IElement { - return o.From -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetFrom(v IElement) { - o.From = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetRelationshipType() RelationshipType { - return o.RelationshipType -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetRelationshipType(v RelationshipType) { - o.RelationshipType = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetStartTime() string { - return o.StartTime -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetStartTime(v string) { - o.StartTime = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetTo() []IElement { - return o.To -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetTo(v ...IElement) { - o.To = v -} - -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetAssessedElement() IElement { - return o.AssessedElement -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetAssessedElement(v IElement) { - o.AssessedElement = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetModifiedTime() string { - return o.ModifiedTime -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetModifiedTime(v string) { - o.ModifiedTime = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetPublishedTime() string { - return o.PublishedTime -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetPublishedTime(v string) { - o.PublishedTime = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetWithdrawnTime() string { - return o.WithdrawnTime -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetWithdrawnTime(v string) { - o.WithdrawnTime = v -} - -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetStatusNotes() string { - return o.StatusNotes -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetStatusNotes(v string) { - o.StatusNotes = v -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) GetVexVersion() string { - return o.VexVersion -} -func (o *VexUnderInvestigationVulnAssessmentRelationship) SetVexVersion(v string) { - o.VexVersion = v -} - -type IFile interface { - ISoftwareArtifact - - // GetContentType provides information about the content type of an Element. - GetContentType() string - - SetContentType(string) - - // GetFileKind describes if a given file is a directory or non-directory kind of file. - GetFileKind() FileKindType - - SetFileKind(FileKindType) -} - -type File struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/File" iri-compact:"software_File" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // BuiltTime specifies the time an artifact was built. - BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` - // OriginatedBy identifies from where or whom the Element originally came. - OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` - // ReleaseTime specifies the time an artifact was released. - ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` - // StandardName the name of a relevant standard that may apply to an artifact. - StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // SupportLevel specifies the level of support associated with an artifact. - SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` - // ValidUntilTime specifies until when the artifact can be used before its usage needs to be - // reassessed. - ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` - - // AdditionalPurpose provides additional purpose information of the software artifact. - AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` - // AttributionText provides a place for the SPDX data creator to record acknowledgement text for - // a software Package, File or Snippet. - AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` - // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be - // used for verifying its identity and/or integrity. - ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` - // CopyrightText identifies the text of one or more copyright notices for a software Package, - // File or Snippet, if any. - CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` - // PrimaryPurpose provides information about the primary purpose of the software artifact. - PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` - - // ContentType provides information about the content type of an Element. - ContentType string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentType" iri-compact:"software_contentType"` - // FileKind describes if a given file is a directory or non-directory kind of file. - FileKind FileKindType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/fileKind" iri-compact:"software_fileKind"` -} - -func NewFile() IFile { - return &File{} -} - -func (o *File) GetSpdxId() string { - return o.SpdxId -} -func (o *File) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *File) GetComment() string { - return o.Comment -} -func (o *File) SetComment(v string) { - o.Comment = v -} -func (o *File) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *File) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *File) GetDescription() string { - return o.Description -} -func (o *File) SetDescription(v string) { - o.Description = v -} -func (o *File) GetExtensions() []IExtension { - return o.Extensions -} -func (o *File) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *File) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *File) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *File) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *File) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *File) GetName() string { - return o.Name -} -func (o *File) SetName(v string) { - o.Name = v -} -func (o *File) GetSummary() string { - return o.Summary -} -func (o *File) SetSummary(v string) { - o.Summary = v -} -func (o *File) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *File) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *File) GetBuiltTime() string { - return o.BuiltTime -} -func (o *File) SetBuiltTime(v string) { - o.BuiltTime = v -} -func (o *File) GetOriginatedBy() []IAgent { - return o.OriginatedBy -} -func (o *File) SetOriginatedBy(v ...IAgent) { - o.OriginatedBy = v -} -func (o *File) GetReleaseTime() string { - return o.ReleaseTime -} -func (o *File) SetReleaseTime(v string) { - o.ReleaseTime = v -} -func (o *File) GetStandardName() []string { - return o.StandardName -} -func (o *File) SetStandardName(v ...string) { - o.StandardName = v -} -func (o *File) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *File) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *File) GetSupportLevel() []SupportType { - return o.SupportLevel -} -func (o *File) SetSupportLevel(v ...SupportType) { - o.SupportLevel = v -} -func (o *File) GetValidUntilTime() string { - return o.ValidUntilTime -} -func (o *File) SetValidUntilTime(v string) { - o.ValidUntilTime = v -} - -func (o *File) GetAdditionalPurpose() []SoftwarePurpose { - return o.AdditionalPurpose -} -func (o *File) SetAdditionalPurpose(v ...SoftwarePurpose) { - o.AdditionalPurpose = v -} -func (o *File) GetAttributionText() []string { - return o.AttributionText -} -func (o *File) SetAttributionText(v ...string) { - o.AttributionText = v -} -func (o *File) GetContentIdentifier() []IContentIdentifier { - return o.ContentIdentifier -} -func (o *File) SetContentIdentifier(v ...IContentIdentifier) { - o.ContentIdentifier = v -} -func (o *File) GetCopyrightText() string { - return o.CopyrightText -} -func (o *File) SetCopyrightText(v string) { - o.CopyrightText = v -} -func (o *File) GetPrimaryPurpose() SoftwarePurpose { - return o.PrimaryPurpose -} -func (o *File) SetPrimaryPurpose(v SoftwarePurpose) { - o.PrimaryPurpose = v -} - -func (o *File) GetContentType() string { - return o.ContentType -} -func (o *File) SetContentType(v string) { - o.ContentType = v -} -func (o *File) GetFileKind() FileKindType { - return o.FileKind -} -func (o *File) SetFileKind(v FileKindType) { - o.FileKind = v -} - -type IPackage interface { - ISoftwareArtifact - - // GetDownloadLocation identifies the download Uniform Resource Identifier for the package at the time - // that the document was created. - GetDownloadLocation() string - - SetDownloadLocation(string) - - // GetHomePage a place for the SPDX document creator to record a website that serves as the - // package's home page. - GetHomePage() string - - SetHomePage(string) - - // GetPackageUrl provides a place for the SPDX data creator to record the package URL string - // (in accordance with the - // [package URL spec](https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst)) - // for a software Package. - GetPackageUrl() string - - SetPackageUrl(string) - - // GetPackageVersion identify the version of a package. - GetPackageVersion() string - - SetPackageVersion(string) - - // GetSourceInfo records any relevant background information or additional comments - // about the origin of the package. - GetSourceInfo() string - - SetSourceInfo(string) -} - -type Package struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/Package" iri-compact:"software_Package" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // BuiltTime specifies the time an artifact was built. - BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` - // OriginatedBy identifies from where or whom the Element originally came. - OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` - // ReleaseTime specifies the time an artifact was released. - ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` - // StandardName the name of a relevant standard that may apply to an artifact. - StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // SupportLevel specifies the level of support associated with an artifact. - SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` - // ValidUntilTime specifies until when the artifact can be used before its usage needs to be - // reassessed. - ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` - - // AdditionalPurpose provides additional purpose information of the software artifact. - AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` - // AttributionText provides a place for the SPDX data creator to record acknowledgement text for - // a software Package, File or Snippet. - AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` - // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be - // used for verifying its identity and/or integrity. - ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` - // CopyrightText identifies the text of one or more copyright notices for a software Package, - // File or Snippet, if any. - CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` - // PrimaryPurpose provides information about the primary purpose of the software artifact. - PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` - - // DownloadLocation identifies the download Uniform Resource Identifier for the package at the time - // that the document was created. - DownloadLocation string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/downloadLocation" iri-compact:"software_downloadLocation"` - // HomePage a place for the SPDX document creator to record a website that serves as the - // package's home page. - HomePage string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/homePage" iri-compact:"software_homePage"` - // PackageUrl provides a place for the SPDX data creator to record the package URL string - // (in accordance with the - // [package URL spec](https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst)) - // for a software Package. - PackageUrl string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageUrl" iri-compact:"software_packageUrl"` - // PackageVersion identify the version of a package. - PackageVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageVersion" iri-compact:"software_packageVersion"` - // SourceInfo records any relevant background information or additional comments - // about the origin of the package. - SourceInfo string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/sourceInfo" iri-compact:"software_sourceInfo"` -} - -func NewPackage() IPackage { - return &Package{} -} - -func (o *Package) GetSpdxId() string { - return o.SpdxId -} -func (o *Package) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Package) GetComment() string { - return o.Comment -} -func (o *Package) SetComment(v string) { - o.Comment = v -} -func (o *Package) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Package) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *Package) GetDescription() string { - return o.Description -} -func (o *Package) SetDescription(v string) { - o.Description = v -} -func (o *Package) GetExtensions() []IExtension { - return o.Extensions -} -func (o *Package) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *Package) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *Package) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *Package) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *Package) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *Package) GetName() string { - return o.Name -} -func (o *Package) SetName(v string) { - o.Name = v -} -func (o *Package) GetSummary() string { - return o.Summary -} -func (o *Package) SetSummary(v string) { - o.Summary = v -} -func (o *Package) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *Package) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *Package) GetBuiltTime() string { - return o.BuiltTime -} -func (o *Package) SetBuiltTime(v string) { - o.BuiltTime = v -} -func (o *Package) GetOriginatedBy() []IAgent { - return o.OriginatedBy -} -func (o *Package) SetOriginatedBy(v ...IAgent) { - o.OriginatedBy = v -} -func (o *Package) GetReleaseTime() string { - return o.ReleaseTime -} -func (o *Package) SetReleaseTime(v string) { - o.ReleaseTime = v -} -func (o *Package) GetStandardName() []string { - return o.StandardName -} -func (o *Package) SetStandardName(v ...string) { - o.StandardName = v -} -func (o *Package) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *Package) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *Package) GetSupportLevel() []SupportType { - return o.SupportLevel -} -func (o *Package) SetSupportLevel(v ...SupportType) { - o.SupportLevel = v -} -func (o *Package) GetValidUntilTime() string { - return o.ValidUntilTime -} -func (o *Package) SetValidUntilTime(v string) { - o.ValidUntilTime = v -} - -func (o *Package) GetAdditionalPurpose() []SoftwarePurpose { - return o.AdditionalPurpose -} -func (o *Package) SetAdditionalPurpose(v ...SoftwarePurpose) { - o.AdditionalPurpose = v -} -func (o *Package) GetAttributionText() []string { - return o.AttributionText -} -func (o *Package) SetAttributionText(v ...string) { - o.AttributionText = v -} -func (o *Package) GetContentIdentifier() []IContentIdentifier { - return o.ContentIdentifier -} -func (o *Package) SetContentIdentifier(v ...IContentIdentifier) { - o.ContentIdentifier = v -} -func (o *Package) GetCopyrightText() string { - return o.CopyrightText -} -func (o *Package) SetCopyrightText(v string) { - o.CopyrightText = v -} -func (o *Package) GetPrimaryPurpose() SoftwarePurpose { - return o.PrimaryPurpose -} -func (o *Package) SetPrimaryPurpose(v SoftwarePurpose) { - o.PrimaryPurpose = v -} - -func (o *Package) GetDownloadLocation() string { - return o.DownloadLocation -} -func (o *Package) SetDownloadLocation(v string) { - o.DownloadLocation = v -} -func (o *Package) GetHomePage() string { - return o.HomePage -} -func (o *Package) SetHomePage(v string) { - o.HomePage = v -} -func (o *Package) GetPackageUrl() string { - return o.PackageUrl -} -func (o *Package) SetPackageUrl(v string) { - o.PackageUrl = v -} -func (o *Package) GetPackageVersion() string { - return o.PackageVersion -} -func (o *Package) SetPackageVersion(v string) { - o.PackageVersion = v -} -func (o *Package) GetSourceInfo() string { - return o.SourceInfo -} -func (o *Package) SetSourceInfo(v string) { - o.SourceInfo = v -} - -type ISbom interface { - IBom - - // GetSbomType provides information about the type of an SBOM. - GetSbomType() []SbomType - - SetSbomType(...SbomType) -} - -type Sbom struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/Sbom" iri-compact:"software_Sbom" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // Elements refers to one or more Elements that are part of an ElementCollection. - Elements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/element" iri-compact:"element"` - // ProfileConformance describes one a profile which the creator of this ElementCollection intends to - // conform to. - ProfileConformance []ProfileIdentifierType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/profileConformance" iri-compact:"profileConformance"` - // RootElements this property is used to denote the root Element(s) of a tree of elements contained in a BOM. - RootElements []IElement `iri:"https://spdx.org/rdf/3.0.0/terms/Core/rootElement" iri-compact:"rootElement"` - - // Context gives information about the circumstances or unifying properties - // that Elements of the bundle have been assembled under. - Context string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/context" iri-compact:"context"` - - // SbomType provides information about the type of an SBOM. - SbomType []SbomType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/sbomType" iri-compact:"software_sbomType"` -} - -func NewSbom() ISbom { - return &Sbom{} -} - -func (o *Sbom) GetSpdxId() string { - return o.SpdxId -} -func (o *Sbom) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Sbom) GetComment() string { - return o.Comment -} -func (o *Sbom) SetComment(v string) { - o.Comment = v -} -func (o *Sbom) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Sbom) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *Sbom) GetDescription() string { - return o.Description -} -func (o *Sbom) SetDescription(v string) { - o.Description = v -} -func (o *Sbom) GetExtensions() []IExtension { - return o.Extensions -} -func (o *Sbom) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *Sbom) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *Sbom) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *Sbom) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *Sbom) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *Sbom) GetName() string { - return o.Name -} -func (o *Sbom) SetName(v string) { - o.Name = v -} -func (o *Sbom) GetSummary() string { - return o.Summary -} -func (o *Sbom) SetSummary(v string) { - o.Summary = v -} -func (o *Sbom) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *Sbom) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *Sbom) GetElements() []IElement { - return o.Elements -} -func (o *Sbom) SetElements(v ...IElement) { - o.Elements = v -} -func (o *Sbom) GetProfileConformance() []ProfileIdentifierType { - return o.ProfileConformance -} -func (o *Sbom) SetProfileConformance(v ...ProfileIdentifierType) { - o.ProfileConformance = v -} -func (o *Sbom) GetRootElements() []IElement { - return o.RootElements -} -func (o *Sbom) SetRootElements(v ...IElement) { - o.RootElements = v -} - -func (o *Sbom) GetContext() string { - return o.Context -} -func (o *Sbom) SetContext(v string) { - o.Context = v -} - -func (o *Sbom) GetSbomType() []SbomType { - return o.SbomType -} -func (o *Sbom) SetSbomType(v ...SbomType) { - o.SbomType = v -} - -type ISnippet interface { - ISoftwareArtifact - - // GetByteRange defines the byte range in the original host file that the snippet information - // applies to. - GetByteRange() IPositiveIntegerRange - - SetByteRange(IPositiveIntegerRange) - - // GetLineRange defines the line range in the original host file that the snippet information - // applies to. - GetLineRange() IPositiveIntegerRange - - SetLineRange(IPositiveIntegerRange) - - // GetSnippetFromFile defines the original host file that the snippet information applies to. - GetSnippetFromFile() IFile - - SetSnippetFromFile(IFile) -} - -type Snippet struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Software/Snippet" iri-compact:"software_Snippet" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // BuiltTime specifies the time an artifact was built. - BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` - // OriginatedBy identifies from where or whom the Element originally came. - OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` - // ReleaseTime specifies the time an artifact was released. - ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` - // StandardName the name of a relevant standard that may apply to an artifact. - StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // SupportLevel specifies the level of support associated with an artifact. - SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` - // ValidUntilTime specifies until when the artifact can be used before its usage needs to be - // reassessed. - ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` - - // AdditionalPurpose provides additional purpose information of the software artifact. - AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` - // AttributionText provides a place for the SPDX data creator to record acknowledgement text for - // a software Package, File or Snippet. - AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` - // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be - // used for verifying its identity and/or integrity. - ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` - // CopyrightText identifies the text of one or more copyright notices for a software Package, - // File or Snippet, if any. - CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` - // PrimaryPurpose provides information about the primary purpose of the software artifact. - PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` - - // ByteRange defines the byte range in the original host file that the snippet information - // applies to. - ByteRange IPositiveIntegerRange `iri:"https://spdx.org/rdf/3.0.0/terms/Software/byteRange" iri-compact:"software_byteRange"` - // LineRange defines the line range in the original host file that the snippet information - // applies to. - LineRange IPositiveIntegerRange `iri:"https://spdx.org/rdf/3.0.0/terms/Software/lineRange" iri-compact:"software_lineRange"` - // SnippetFromFile defines the original host file that the snippet information applies to. - SnippetFromFile IFile `iri:"https://spdx.org/rdf/3.0.0/terms/Software/snippetFromFile" iri-compact:"software_snippetFromFile"` -} - -func NewSnippet() ISnippet { - return &Snippet{} -} - -func (o *Snippet) GetSpdxId() string { - return o.SpdxId -} -func (o *Snippet) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *Snippet) GetComment() string { - return o.Comment -} -func (o *Snippet) SetComment(v string) { - o.Comment = v -} -func (o *Snippet) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *Snippet) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *Snippet) GetDescription() string { - return o.Description -} -func (o *Snippet) SetDescription(v string) { - o.Description = v -} -func (o *Snippet) GetExtensions() []IExtension { - return o.Extensions -} -func (o *Snippet) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *Snippet) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *Snippet) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *Snippet) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *Snippet) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *Snippet) GetName() string { - return o.Name -} -func (o *Snippet) SetName(v string) { - o.Name = v -} -func (o *Snippet) GetSummary() string { - return o.Summary -} -func (o *Snippet) SetSummary(v string) { - o.Summary = v -} -func (o *Snippet) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *Snippet) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *Snippet) GetBuiltTime() string { - return o.BuiltTime -} -func (o *Snippet) SetBuiltTime(v string) { - o.BuiltTime = v -} -func (o *Snippet) GetOriginatedBy() []IAgent { - return o.OriginatedBy -} -func (o *Snippet) SetOriginatedBy(v ...IAgent) { - o.OriginatedBy = v -} -func (o *Snippet) GetReleaseTime() string { - return o.ReleaseTime -} -func (o *Snippet) SetReleaseTime(v string) { - o.ReleaseTime = v -} -func (o *Snippet) GetStandardName() []string { - return o.StandardName -} -func (o *Snippet) SetStandardName(v ...string) { - o.StandardName = v -} -func (o *Snippet) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *Snippet) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *Snippet) GetSupportLevel() []SupportType { - return o.SupportLevel -} -func (o *Snippet) SetSupportLevel(v ...SupportType) { - o.SupportLevel = v -} -func (o *Snippet) GetValidUntilTime() string { - return o.ValidUntilTime -} -func (o *Snippet) SetValidUntilTime(v string) { - o.ValidUntilTime = v -} - -func (o *Snippet) GetAdditionalPurpose() []SoftwarePurpose { - return o.AdditionalPurpose -} -func (o *Snippet) SetAdditionalPurpose(v ...SoftwarePurpose) { - o.AdditionalPurpose = v -} -func (o *Snippet) GetAttributionText() []string { - return o.AttributionText -} -func (o *Snippet) SetAttributionText(v ...string) { - o.AttributionText = v -} -func (o *Snippet) GetContentIdentifier() []IContentIdentifier { - return o.ContentIdentifier -} -func (o *Snippet) SetContentIdentifier(v ...IContentIdentifier) { - o.ContentIdentifier = v -} -func (o *Snippet) GetCopyrightText() string { - return o.CopyrightText -} -func (o *Snippet) SetCopyrightText(v string) { - o.CopyrightText = v -} -func (o *Snippet) GetPrimaryPurpose() SoftwarePurpose { - return o.PrimaryPurpose -} -func (o *Snippet) SetPrimaryPurpose(v SoftwarePurpose) { - o.PrimaryPurpose = v -} - -func (o *Snippet) GetByteRange() IPositiveIntegerRange { - return o.ByteRange -} -func (o *Snippet) SetByteRange(v IPositiveIntegerRange) { - o.ByteRange = v -} -func (o *Snippet) GetLineRange() IPositiveIntegerRange { - return o.LineRange -} -func (o *Snippet) SetLineRange(v IPositiveIntegerRange) { - o.LineRange = v -} -func (o *Snippet) GetSnippetFromFile() IFile { - return o.SnippetFromFile -} -func (o *Snippet) SetSnippetFromFile(v IFile) { - o.SnippetFromFile = v -} - -type IAIPackage interface { - IPackage - - // GetAutonomyType states if a human is involved in the decisions of the AI software. - GetAutonomyType() PresenceType - - SetAutonomyType(PresenceType) - - // GetDomain captures the domain in which the AI package can be used. - GetDomain() []string - - SetDomain(...string) - - // GetEnergyConsumption indicates the amount of energy consumed to train the AI model. - GetEnergyConsumption() IEnergyConsumption - - SetEnergyConsumption(IEnergyConsumption) - - // GetHyperparameter records a hyperparameter used to build the AI model contained in the AI - // package. - GetHyperparameter() []IDictionaryEntry - - SetHyperparameter(...IDictionaryEntry) - - // GetInformationAboutApplication provides relevant information about the AI software, not including the model - // description. - GetInformationAboutApplication() string - - SetInformationAboutApplication(string) - - // GetInformationAboutTraining describes relevant information about different steps of the training process. - GetInformationAboutTraining() string - - SetInformationAboutTraining(string) - - // GetLimitation captures a limitation of the AI software. - GetLimitation() string - - SetLimitation(string) - - // GetMetric records the measurement of prediction quality of the AI model. - GetMetric() []IDictionaryEntry - - SetMetric(...IDictionaryEntry) - - // GetMetricDecisionThreshold captures the threshold that was used for computation of a metric described in - // the metric field. - GetMetricDecisionThreshold() []IDictionaryEntry - - SetMetricDecisionThreshold(...IDictionaryEntry) - - // GetModelDataPreprocessing describes all the preprocessing steps applied to the training data before the - // model training. - GetModelDataPreprocessing() []string - - SetModelDataPreprocessing(...string) - - // GetModelExplainability describes methods that can be used to explain the model. - GetModelExplainability() []string - - SetModelExplainability(...string) - - // GetSafetyRiskAssessment records the results of general safety risk assessment of the AI system. - GetSafetyRiskAssessment() SafetyRiskAssessmentType - - SetSafetyRiskAssessment(SafetyRiskAssessmentType) - - // GetStandardCompliance captures a standard that is being complied with. - GetStandardCompliance() []string - - SetStandardCompliance(...string) - - // GetTypeOfModel records the type of the model used in the AI software. - GetTypeOfModel() []string - - SetTypeOfModel(...string) - - // GetUseSensitivePersonalInformation records if sensitive personal information is used during model training or - // could be used during the inference. - GetUseSensitivePersonalInformation() PresenceType - - SetUseSensitivePersonalInformation(PresenceType) -} - -type AIPackage struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/AIPackage" iri-compact:"ai_AIPackage" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // BuiltTime specifies the time an artifact was built. - BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` - // OriginatedBy identifies from where or whom the Element originally came. - OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` - // ReleaseTime specifies the time an artifact was released. - ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` - // StandardName the name of a relevant standard that may apply to an artifact. - StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // SupportLevel specifies the level of support associated with an artifact. - SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` - // ValidUntilTime specifies until when the artifact can be used before its usage needs to be - // reassessed. - ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` - - // AdditionalPurpose provides additional purpose information of the software artifact. - AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` - // AttributionText provides a place for the SPDX data creator to record acknowledgement text for - // a software Package, File or Snippet. - AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` - // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be - // used for verifying its identity and/or integrity. - ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` - // CopyrightText identifies the text of one or more copyright notices for a software Package, - // File or Snippet, if any. - CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` - // PrimaryPurpose provides information about the primary purpose of the software artifact. - PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` - - // DownloadLocation identifies the download Uniform Resource Identifier for the package at the time - // that the document was created. - DownloadLocation string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/downloadLocation" iri-compact:"software_downloadLocation"` - // HomePage a place for the SPDX document creator to record a website that serves as the - // package's home page. - HomePage string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/homePage" iri-compact:"software_homePage"` - // PackageUrl provides a place for the SPDX data creator to record the package URL string - // (in accordance with the - // [package URL spec](https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst)) - // for a software Package. - PackageUrl string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageUrl" iri-compact:"software_packageUrl"` - // PackageVersion identify the version of a package. - PackageVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageVersion" iri-compact:"software_packageVersion"` - // SourceInfo records any relevant background information or additional comments - // about the origin of the package. - SourceInfo string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/sourceInfo" iri-compact:"software_sourceInfo"` - - // AutonomyType states if a human is involved in the decisions of the AI software. - AutonomyType PresenceType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/autonomyType" iri-compact:"ai_autonomyType"` - // Domain captures the domain in which the AI package can be used. - Domain []string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/domain" iri-compact:"ai_domain"` - // EnergyConsumption indicates the amount of energy consumed to train the AI model. - EnergyConsumption IEnergyConsumption `iri:"https://spdx.org/rdf/3.0.0/terms/AI/energyConsumption" iri-compact:"ai_energyConsumption"` - // Hyperparameter records a hyperparameter used to build the AI model contained in the AI - // package. - Hyperparameter []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/AI/hyperparameter" iri-compact:"ai_hyperparameter"` - // InformationAboutApplication provides relevant information about the AI software, not including the model - // description. - InformationAboutApplication string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/informationAboutApplication" iri-compact:"ai_informationAboutApplication"` - // InformationAboutTraining describes relevant information about different steps of the training process. - InformationAboutTraining string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/informationAboutTraining" iri-compact:"ai_informationAboutTraining"` - // Limitation captures a limitation of the AI software. - Limitation string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/limitation" iri-compact:"ai_limitation"` - // Metric records the measurement of prediction quality of the AI model. - Metric []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/AI/metric" iri-compact:"ai_metric"` - // MetricDecisionThreshold captures the threshold that was used for computation of a metric described in - // the metric field. - MetricDecisionThreshold []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/AI/metricDecisionThreshold" iri-compact:"ai_metricDecisionThreshold"` - // ModelDataPreprocessing describes all the preprocessing steps applied to the training data before the - // model training. - ModelDataPreprocessing []string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/modelDataPreprocessing" iri-compact:"ai_modelDataPreprocessing"` - // ModelExplainability describes methods that can be used to explain the model. - ModelExplainability []string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/modelExplainability" iri-compact:"ai_modelExplainability"` - // SafetyRiskAssessment records the results of general safety risk assessment of the AI system. - SafetyRiskAssessment SafetyRiskAssessmentType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/safetyRiskAssessment" iri-compact:"ai_safetyRiskAssessment"` - // StandardCompliance captures a standard that is being complied with. - StandardCompliance []string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/standardCompliance" iri-compact:"ai_standardCompliance"` - // TypeOfModel records the type of the model used in the AI software. - TypeOfModel []string `iri:"https://spdx.org/rdf/3.0.0/terms/AI/typeOfModel" iri-compact:"ai_typeOfModel"` - // UseSensitivePersonalInformation records if sensitive personal information is used during model training or - // could be used during the inference. - UseSensitivePersonalInformation PresenceType `iri:"https://spdx.org/rdf/3.0.0/terms/AI/useSensitivePersonalInformation" iri-compact:"ai_useSensitivePersonalInformation"` -} - -func NewAIPackage() IAIPackage { - return &AIPackage{} -} - -func (o *AIPackage) GetSpdxId() string { - return o.SpdxId -} -func (o *AIPackage) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *AIPackage) GetComment() string { - return o.Comment -} -func (o *AIPackage) SetComment(v string) { - o.Comment = v -} -func (o *AIPackage) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *AIPackage) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *AIPackage) GetDescription() string { - return o.Description -} -func (o *AIPackage) SetDescription(v string) { - o.Description = v -} -func (o *AIPackage) GetExtensions() []IExtension { - return o.Extensions -} -func (o *AIPackage) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *AIPackage) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *AIPackage) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *AIPackage) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *AIPackage) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *AIPackage) GetName() string { - return o.Name -} -func (o *AIPackage) SetName(v string) { - o.Name = v -} -func (o *AIPackage) GetSummary() string { - return o.Summary -} -func (o *AIPackage) SetSummary(v string) { - o.Summary = v -} -func (o *AIPackage) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *AIPackage) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *AIPackage) GetBuiltTime() string { - return o.BuiltTime -} -func (o *AIPackage) SetBuiltTime(v string) { - o.BuiltTime = v -} -func (o *AIPackage) GetOriginatedBy() []IAgent { - return o.OriginatedBy -} -func (o *AIPackage) SetOriginatedBy(v ...IAgent) { - o.OriginatedBy = v -} -func (o *AIPackage) GetReleaseTime() string { - return o.ReleaseTime -} -func (o *AIPackage) SetReleaseTime(v string) { - o.ReleaseTime = v -} -func (o *AIPackage) GetStandardName() []string { - return o.StandardName -} -func (o *AIPackage) SetStandardName(v ...string) { - o.StandardName = v -} -func (o *AIPackage) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *AIPackage) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *AIPackage) GetSupportLevel() []SupportType { - return o.SupportLevel -} -func (o *AIPackage) SetSupportLevel(v ...SupportType) { - o.SupportLevel = v -} -func (o *AIPackage) GetValidUntilTime() string { - return o.ValidUntilTime -} -func (o *AIPackage) SetValidUntilTime(v string) { - o.ValidUntilTime = v -} - -func (o *AIPackage) GetAdditionalPurpose() []SoftwarePurpose { - return o.AdditionalPurpose -} -func (o *AIPackage) SetAdditionalPurpose(v ...SoftwarePurpose) { - o.AdditionalPurpose = v -} -func (o *AIPackage) GetAttributionText() []string { - return o.AttributionText -} -func (o *AIPackage) SetAttributionText(v ...string) { - o.AttributionText = v -} -func (o *AIPackage) GetContentIdentifier() []IContentIdentifier { - return o.ContentIdentifier -} -func (o *AIPackage) SetContentIdentifier(v ...IContentIdentifier) { - o.ContentIdentifier = v -} -func (o *AIPackage) GetCopyrightText() string { - return o.CopyrightText -} -func (o *AIPackage) SetCopyrightText(v string) { - o.CopyrightText = v -} -func (o *AIPackage) GetPrimaryPurpose() SoftwarePurpose { - return o.PrimaryPurpose -} -func (o *AIPackage) SetPrimaryPurpose(v SoftwarePurpose) { - o.PrimaryPurpose = v -} - -func (o *AIPackage) GetDownloadLocation() string { - return o.DownloadLocation -} -func (o *AIPackage) SetDownloadLocation(v string) { - o.DownloadLocation = v -} -func (o *AIPackage) GetHomePage() string { - return o.HomePage -} -func (o *AIPackage) SetHomePage(v string) { - o.HomePage = v -} -func (o *AIPackage) GetPackageUrl() string { - return o.PackageUrl -} -func (o *AIPackage) SetPackageUrl(v string) { - o.PackageUrl = v -} -func (o *AIPackage) GetPackageVersion() string { - return o.PackageVersion -} -func (o *AIPackage) SetPackageVersion(v string) { - o.PackageVersion = v -} -func (o *AIPackage) GetSourceInfo() string { - return o.SourceInfo -} -func (o *AIPackage) SetSourceInfo(v string) { - o.SourceInfo = v -} - -func (o *AIPackage) GetAutonomyType() PresenceType { - return o.AutonomyType -} -func (o *AIPackage) SetAutonomyType(v PresenceType) { - o.AutonomyType = v -} -func (o *AIPackage) GetDomain() []string { - return o.Domain -} -func (o *AIPackage) SetDomain(v ...string) { - o.Domain = v -} -func (o *AIPackage) GetEnergyConsumption() IEnergyConsumption { - return o.EnergyConsumption -} -func (o *AIPackage) SetEnergyConsumption(v IEnergyConsumption) { - o.EnergyConsumption = v -} -func (o *AIPackage) GetHyperparameter() []IDictionaryEntry { - return o.Hyperparameter -} -func (o *AIPackage) SetHyperparameter(v ...IDictionaryEntry) { - o.Hyperparameter = v -} -func (o *AIPackage) GetInformationAboutApplication() string { - return o.InformationAboutApplication -} -func (o *AIPackage) SetInformationAboutApplication(v string) { - o.InformationAboutApplication = v -} -func (o *AIPackage) GetInformationAboutTraining() string { - return o.InformationAboutTraining -} -func (o *AIPackage) SetInformationAboutTraining(v string) { - o.InformationAboutTraining = v -} -func (o *AIPackage) GetLimitation() string { - return o.Limitation -} -func (o *AIPackage) SetLimitation(v string) { - o.Limitation = v -} -func (o *AIPackage) GetMetric() []IDictionaryEntry { - return o.Metric -} -func (o *AIPackage) SetMetric(v ...IDictionaryEntry) { - o.Metric = v -} -func (o *AIPackage) GetMetricDecisionThreshold() []IDictionaryEntry { - return o.MetricDecisionThreshold -} -func (o *AIPackage) SetMetricDecisionThreshold(v ...IDictionaryEntry) { - o.MetricDecisionThreshold = v -} -func (o *AIPackage) GetModelDataPreprocessing() []string { - return o.ModelDataPreprocessing -} -func (o *AIPackage) SetModelDataPreprocessing(v ...string) { - o.ModelDataPreprocessing = v -} -func (o *AIPackage) GetModelExplainability() []string { - return o.ModelExplainability -} -func (o *AIPackage) SetModelExplainability(v ...string) { - o.ModelExplainability = v -} -func (o *AIPackage) GetSafetyRiskAssessment() SafetyRiskAssessmentType { - return o.SafetyRiskAssessment -} -func (o *AIPackage) SetSafetyRiskAssessment(v SafetyRiskAssessmentType) { - o.SafetyRiskAssessment = v -} -func (o *AIPackage) GetStandardCompliance() []string { - return o.StandardCompliance -} -func (o *AIPackage) SetStandardCompliance(v ...string) { - o.StandardCompliance = v -} -func (o *AIPackage) GetTypeOfModel() []string { - return o.TypeOfModel -} -func (o *AIPackage) SetTypeOfModel(v ...string) { - o.TypeOfModel = v -} -func (o *AIPackage) GetUseSensitivePersonalInformation() PresenceType { - return o.UseSensitivePersonalInformation -} -func (o *AIPackage) SetUseSensitivePersonalInformation(v PresenceType) { - o.UseSensitivePersonalInformation = v -} - -type IDatasetPackage interface { - IPackage - - // GetAnonymizationMethodUsed describes the anonymization methods used. - GetAnonymizationMethodUsed() []string - - SetAnonymizationMethodUsed(...string) - - // GetConfidentialityLevel describes the confidentiality level of the data points contained in the dataset. - GetConfidentialityLevel() ConfidentialityLevelType - - SetConfidentialityLevel(ConfidentialityLevelType) - - // GetDataCollectionProcess describes how the dataset was collected. - GetDataCollectionProcess() string - - SetDataCollectionProcess(string) - - // GetDataPreprocessing describes the preprocessing steps that were applied to the raw data to create the given dataset. - GetDataPreprocessing() []string - - SetDataPreprocessing(...string) - - // GetDatasetAvailability the field describes the availability of a dataset. - GetDatasetAvailability() DatasetAvailabilityType - - SetDatasetAvailability(DatasetAvailabilityType) - - // GetDatasetNoise describes potentially noisy elements of the dataset. - GetDatasetNoise() string - - SetDatasetNoise(string) - - // GetDatasetSize captures the size of the dataset. - GetDatasetSize() uint - - SetDatasetSize(uint) - - // GetDatasetType describes the type of the given dataset. - GetDatasetType() []DatasetType - - SetDatasetType(...DatasetType) - - // GetDatasetUpdateMechanism describes a mechanism to update the dataset. - GetDatasetUpdateMechanism() string - - SetDatasetUpdateMechanism(string) - - // GetHasSensitivePersonalInformation describes if any sensitive personal information is present in the dataset. - GetHasSensitivePersonalInformation() PresenceType - - SetHasSensitivePersonalInformation(PresenceType) - - // GetIntendedUse describes what the given dataset should be used for. - GetIntendedUse() string - - SetIntendedUse(string) - - // GetKnownBias records the biases that the dataset is known to encompass. - GetKnownBias() []string - - SetKnownBias(...string) - - // GetSensor describes a sensor used for collecting the data. - GetSensor() []IDictionaryEntry - - SetSensor(...IDictionaryEntry) -} - -type DatasetPackage struct { - _ ldType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetPackage" iri-compact:"dataset_DatasetPackage" id-prop:"spdxId"` - - // SpdxId identifier property - SpdxId string `iri:"@id" iri-compact:"spdxId"` - // Comment provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/comment" iri-compact:"comment"` - // CreationInfo provides information about the creation of the Element. - CreationInfo ICreationInfo `iri:"https://spdx.org/rdf/3.0.0/terms/Core/creationInfo" iri-compact:"creationInfo"` - // Description provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/description" iri-compact:"description"` - // Extensions specifies an Extension characterization of some aspect of an Element. - Extensions []IExtension `iri:"https://spdx.org/rdf/3.0.0/terms/Core/extension" iri-compact:"extension"` - // ExternalIdentifiers provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers []IExternalIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` - // ExternalRefs points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs []IExternalRef `iri:"https://spdx.org/rdf/3.0.0/terms/Core/externalRef" iri-compact:"externalRef"` - // Name identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/name" iri-compact:"name"` - // Summary a short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/summary" iri-compact:"summary"` - // VerifiedUsing provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsing []IIntegrityMethod `iri:"https://spdx.org/rdf/3.0.0/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` - - // BuiltTime specifies the time an artifact was built. - BuiltTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/builtTime" iri-compact:"builtTime"` - // OriginatedBy identifies from where or whom the Element originally came. - OriginatedBy []IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/originatedBy" iri-compact:"originatedBy"` - // ReleaseTime specifies the time an artifact was released. - ReleaseTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/releaseTime" iri-compact:"releaseTime"` - // StandardName the name of a relevant standard that may apply to an artifact. - StandardName []string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/standardName" iri-compact:"standardName"` - // SuppliedBy identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy IAgent `iri:"https://spdx.org/rdf/3.0.0/terms/Core/suppliedBy" iri-compact:"suppliedBy"` - // SupportLevel specifies the level of support associated with an artifact. - SupportLevel []SupportType `iri:"https://spdx.org/rdf/3.0.0/terms/Core/supportLevel" iri-compact:"supportLevel"` - // ValidUntilTime specifies until when the artifact can be used before its usage needs to be - // reassessed. - ValidUntilTime string `iri:"https://spdx.org/rdf/3.0.0/terms/Core/validUntilTime" iri-compact:"validUntilTime"` - - // AdditionalPurpose provides additional purpose information of the software artifact. - AdditionalPurpose []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` - // AttributionText provides a place for the SPDX data creator to record acknowledgement text for - // a software Package, File or Snippet. - AttributionText []string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/attributionText" iri-compact:"software_attributionText"` - // ContentIdentifier a canonical, unique, immutable identifier of the artifact content, that may be - // used for verifying its identity and/or integrity. - ContentIdentifier []IContentIdentifier `iri:"https://spdx.org/rdf/3.0.0/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` - // CopyrightText identifies the text of one or more copyright notices for a software Package, - // File or Snippet, if any. - CopyrightText string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/copyrightText" iri-compact:"software_copyrightText"` - // PrimaryPurpose provides information about the primary purpose of the software artifact. - PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.0/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` - - // DownloadLocation identifies the download Uniform Resource Identifier for the package at the time - // that the document was created. - DownloadLocation string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/downloadLocation" iri-compact:"software_downloadLocation"` - // HomePage a place for the SPDX document creator to record a website that serves as the - // package's home page. - HomePage string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/homePage" iri-compact:"software_homePage"` - // PackageUrl provides a place for the SPDX data creator to record the package URL string - // (in accordance with the - // [package URL spec](https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst)) - // for a software Package. - PackageUrl string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageUrl" iri-compact:"software_packageUrl"` - // PackageVersion identify the version of a package. - PackageVersion string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/packageVersion" iri-compact:"software_packageVersion"` - // SourceInfo records any relevant background information or additional comments - // about the origin of the package. - SourceInfo string `iri:"https://spdx.org/rdf/3.0.0/terms/Software/sourceInfo" iri-compact:"software_sourceInfo"` - - // AnonymizationMethodUsed describes the anonymization methods used. - AnonymizationMethodUsed []string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/anonymizationMethodUsed" iri-compact:"dataset_anonymizationMethodUsed"` - // ConfidentialityLevel describes the confidentiality level of the data points contained in the dataset. - ConfidentialityLevel ConfidentialityLevelType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/confidentialityLevel" iri-compact:"dataset_confidentialityLevel"` - // DataCollectionProcess describes how the dataset was collected. - DataCollectionProcess string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/dataCollectionProcess" iri-compact:"dataset_dataCollectionProcess"` - // DataPreprocessing describes the preprocessing steps that were applied to the raw data to create the given dataset. - DataPreprocessing []string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/dataPreprocessing" iri-compact:"dataset_dataPreprocessing"` - // DatasetAvailability the field describes the availability of a dataset. - DatasetAvailability DatasetAvailabilityType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/datasetAvailability" iri-compact:"dataset_datasetAvailability"` - // DatasetNoise describes potentially noisy elements of the dataset. - DatasetNoise string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/datasetNoise" iri-compact:"dataset_datasetNoise"` - // DatasetSize captures the size of the dataset. - DatasetSize uint `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/datasetSize" iri-compact:"dataset_datasetSize"` - // DatasetType describes the type of the given dataset. - DatasetType []DatasetType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/datasetType" iri-compact:"dataset_datasetType"` - // DatasetUpdateMechanism describes a mechanism to update the dataset. - DatasetUpdateMechanism string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/datasetUpdateMechanism" iri-compact:"dataset_datasetUpdateMechanism"` - // HasSensitivePersonalInformation describes if any sensitive personal information is present in the dataset. - HasSensitivePersonalInformation PresenceType `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/hasSensitivePersonalInformation" iri-compact:"dataset_hasSensitivePersonalInformation"` - // IntendedUse describes what the given dataset should be used for. - IntendedUse string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/intendedUse" iri-compact:"dataset_intendedUse"` - // KnownBias records the biases that the dataset is known to encompass. - KnownBias []string `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/knownBias" iri-compact:"dataset_knownBias"` - // Sensor describes a sensor used for collecting the data. - Sensor []IDictionaryEntry `iri:"https://spdx.org/rdf/3.0.0/terms/Dataset/sensor" iri-compact:"dataset_sensor"` -} - -func NewDatasetPackage() IDatasetPackage { - return &DatasetPackage{} -} - -func (o *DatasetPackage) GetSpdxId() string { - return o.SpdxId -} -func (o *DatasetPackage) SetSpdxId(v string) { - o.SpdxId = v -} -func (o *DatasetPackage) GetComment() string { - return o.Comment -} -func (o *DatasetPackage) SetComment(v string) { - o.Comment = v -} -func (o *DatasetPackage) GetCreationInfo() ICreationInfo { - return o.CreationInfo -} -func (o *DatasetPackage) SetCreationInfo(v ICreationInfo) { - o.CreationInfo = v -} -func (o *DatasetPackage) GetDescription() string { - return o.Description -} -func (o *DatasetPackage) SetDescription(v string) { - o.Description = v -} -func (o *DatasetPackage) GetExtensions() []IExtension { - return o.Extensions -} -func (o *DatasetPackage) SetExtensions(v ...IExtension) { - o.Extensions = v -} -func (o *DatasetPackage) GetExternalIdentifiers() []IExternalIdentifier { - return o.ExternalIdentifiers -} -func (o *DatasetPackage) SetExternalIdentifiers(v ...IExternalIdentifier) { - o.ExternalIdentifiers = v -} -func (o *DatasetPackage) GetExternalRefs() []IExternalRef { - return o.ExternalRefs -} -func (o *DatasetPackage) SetExternalRefs(v ...IExternalRef) { - o.ExternalRefs = v -} -func (o *DatasetPackage) GetName() string { - return o.Name -} -func (o *DatasetPackage) SetName(v string) { - o.Name = v -} -func (o *DatasetPackage) GetSummary() string { - return o.Summary -} -func (o *DatasetPackage) SetSummary(v string) { - o.Summary = v -} -func (o *DatasetPackage) GetVerifiedUsing() []IIntegrityMethod { - return o.VerifiedUsing -} -func (o *DatasetPackage) SetVerifiedUsing(v ...IIntegrityMethod) { - o.VerifiedUsing = v -} - -func (o *DatasetPackage) GetBuiltTime() string { - return o.BuiltTime -} -func (o *DatasetPackage) SetBuiltTime(v string) { - o.BuiltTime = v -} -func (o *DatasetPackage) GetOriginatedBy() []IAgent { - return o.OriginatedBy -} -func (o *DatasetPackage) SetOriginatedBy(v ...IAgent) { - o.OriginatedBy = v -} -func (o *DatasetPackage) GetReleaseTime() string { - return o.ReleaseTime -} -func (o *DatasetPackage) SetReleaseTime(v string) { - o.ReleaseTime = v -} -func (o *DatasetPackage) GetStandardName() []string { - return o.StandardName -} -func (o *DatasetPackage) SetStandardName(v ...string) { - o.StandardName = v -} -func (o *DatasetPackage) GetSuppliedBy() IAgent { - return o.SuppliedBy -} -func (o *DatasetPackage) SetSuppliedBy(v IAgent) { - o.SuppliedBy = v -} -func (o *DatasetPackage) GetSupportLevel() []SupportType { - return o.SupportLevel -} -func (o *DatasetPackage) SetSupportLevel(v ...SupportType) { - o.SupportLevel = v -} -func (o *DatasetPackage) GetValidUntilTime() string { - return o.ValidUntilTime -} -func (o *DatasetPackage) SetValidUntilTime(v string) { - o.ValidUntilTime = v -} - -func (o *DatasetPackage) GetAdditionalPurpose() []SoftwarePurpose { - return o.AdditionalPurpose -} -func (o *DatasetPackage) SetAdditionalPurpose(v ...SoftwarePurpose) { - o.AdditionalPurpose = v -} -func (o *DatasetPackage) GetAttributionText() []string { - return o.AttributionText -} -func (o *DatasetPackage) SetAttributionText(v ...string) { - o.AttributionText = v -} -func (o *DatasetPackage) GetContentIdentifier() []IContentIdentifier { - return o.ContentIdentifier -} -func (o *DatasetPackage) SetContentIdentifier(v ...IContentIdentifier) { - o.ContentIdentifier = v -} -func (o *DatasetPackage) GetCopyrightText() string { - return o.CopyrightText -} -func (o *DatasetPackage) SetCopyrightText(v string) { - o.CopyrightText = v -} -func (o *DatasetPackage) GetPrimaryPurpose() SoftwarePurpose { - return o.PrimaryPurpose -} -func (o *DatasetPackage) SetPrimaryPurpose(v SoftwarePurpose) { - o.PrimaryPurpose = v -} - -func (o *DatasetPackage) GetDownloadLocation() string { - return o.DownloadLocation -} -func (o *DatasetPackage) SetDownloadLocation(v string) { - o.DownloadLocation = v -} -func (o *DatasetPackage) GetHomePage() string { - return o.HomePage +func (o *ExternalIRI) asSecurityExploitCatalogVulnAssessmentRelationship() *SecurityExploitCatalogVulnAssessmentRelationship { + return nil } -func (o *DatasetPackage) SetHomePage(v string) { - o.HomePage = v +func (o *ExternalIRI) asSecuritySsvcVulnAssessmentRelationship() *SecuritySsvcVulnAssessmentRelationship { + return nil } -func (o *DatasetPackage) GetPackageUrl() string { - return o.PackageUrl +func (o *ExternalIRI) asSecurityVexVulnAssessmentRelationship() *SecurityVexVulnAssessmentRelationship { + return nil } -func (o *DatasetPackage) SetPackageUrl(v string) { - o.PackageUrl = v +func (o *ExternalIRI) asSecurityVulnerability() *SecurityVulnerability { return nil } +func (o *ExternalIRI) asSoftwareSoftwareArtifact() *SoftwareSoftwareArtifact { return nil } +func (o *ExternalIRI) asBom() *Bom { return nil } +func (o *ExternalIRI) asExpandedlicensingCustomLicense() *ExpandedlicensingCustomLicense { return nil } +func (o *ExternalIRI) asSecurityVexAffectedVulnAssessmentRelationship() *SecurityVexAffectedVulnAssessmentRelationship { + return nil } -func (o *DatasetPackage) GetPackageVersion() string { - return o.PackageVersion +func (o *ExternalIRI) asSecurityVexFixedVulnAssessmentRelationship() *SecurityVexFixedVulnAssessmentRelationship { + return nil } -func (o *DatasetPackage) SetPackageVersion(v string) { - o.PackageVersion = v +func (o *ExternalIRI) asSecurityVexNotAffectedVulnAssessmentRelationship() *SecurityVexNotAffectedVulnAssessmentRelationship { + return nil } -func (o *DatasetPackage) GetSourceInfo() string { - return o.SourceInfo +func (o *ExternalIRI) asSecurityVexUnderInvestigationVulnAssessmentRelationship() *SecurityVexUnderInvestigationVulnAssessmentRelationship { + return nil } -func (o *DatasetPackage) SetSourceInfo(v string) { - o.SourceInfo = v +func (o *ExternalIRI) asSoftwareFile() *SoftwareFile { return nil } +func (o *ExternalIRI) asSoftwarePackage() *SoftwarePackage { return nil } +func (o *ExternalIRI) asSoftwareSbom() *SoftwareSbom { return nil } +func (o *ExternalIRI) asSoftwareSnippet() *SoftwareSnippet { return nil } +func (o *ExternalIRI) asAiAIPackage() *AiAIPackage { return nil } +func (o *ExternalIRI) asDatasetDatasetPackage() *DatasetDatasetPackage { return nil } + +func cast[T any](value any) *T { + var t T + switch any(t).(type) { + case AiEnergyConsumption: + if v, ok := any(castAiEnergyConsumption(value)).(*T); ok { + return v + } + case AiEnergyConsumptionDescription: + if v, ok := any(castAiEnergyConsumptionDescription(value)).(*T); ok { + return v + } + case CreationInfo: + if v, ok := any(castCreationInfo(value)).(*T); ok { + return v + } + case DictionaryEntry: + if v, ok := any(castDictionaryEntry(value)).(*T); ok { + return v + } + case Element: + if v, ok := any(castElement(value)).(*T); ok { + return v + } + case ElementCollection: + if v, ok := any(castElementCollection(value)).(*T); ok { + return v + } + case ExternalIdentifier: + if v, ok := any(castExternalIdentifier(value)).(*T); ok { + return v + } + case ExternalMap: + if v, ok := any(castExternalMap(value)).(*T); ok { + return v + } + case ExternalRef: + if v, ok := any(castExternalRef(value)).(*T); ok { + return v + } + case IndividualElement: + if v, ok := any(castIndividualElement(value)).(*T); ok { + return v + } + case IntegrityMethod: + if v, ok := any(castIntegrityMethod(value)).(*T); ok { + return v + } + case NamespaceMap: + if v, ok := any(castNamespaceMap(value)).(*T); ok { + return v + } + case PackageVerificationCode: + if v, ok := any(castPackageVerificationCode(value)).(*T); ok { + return v + } + case PositiveIntegerRange: + if v, ok := any(castPositiveIntegerRange(value)).(*T); ok { + return v + } + case Relationship: + if v, ok := any(castRelationship(value)).(*T); ok { + return v + } + case SpdxDocument: + if v, ok := any(castSpdxDocument(value)).(*T); ok { + return v + } + case Tool: + if v, ok := any(castTool(value)).(*T); ok { + return v + } + case ExpandedlicensingLicenseAddition: + if v, ok := any(castExpandedlicensingLicenseAddition(value)).(*T); ok { + return v + } + case ExpandedlicensingListedLicenseException: + if v, ok := any(castExpandedlicensingListedLicenseException(value)).(*T); ok { + return v + } + case ExtensionCdxPropertyEntry: + if v, ok := any(castExtensionCdxPropertyEntry(value)).(*T); ok { + return v + } + case ExtensionExtension: + if v, ok := any(castExtensionExtension(value)).(*T); ok { + return v + } + case SecurityVulnAssessmentRelationship: + if v, ok := any(castSecurityVulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SimplelicensingAnyLicenseInfo: + if v, ok := any(castSimplelicensingAnyLicenseInfo(value)).(*T); ok { + return v + } + case SimplelicensingLicenseExpression: + if v, ok := any(castSimplelicensingLicenseExpression(value)).(*T); ok { + return v + } + case SimplelicensingSimpleLicensingText: + if v, ok := any(castSimplelicensingSimpleLicensingText(value)).(*T); ok { + return v + } + case SoftwareContentIdentifier: + if v, ok := any(castSoftwareContentIdentifier(value)).(*T); ok { + return v + } + case BuildBuild: + if v, ok := any(castBuildBuild(value)).(*T); ok { + return v + } + case Agent: + if v, ok := any(castAgent(value)).(*T); ok { + return v + } + case Annotation: + if v, ok := any(castAnnotation(value)).(*T); ok { + return v + } + case Artifact: + if v, ok := any(castArtifact(value)).(*T); ok { + return v + } + case Bundle: + if v, ok := any(castBundle(value)).(*T); ok { + return v + } + case Hash: + if v, ok := any(castHash(value)).(*T); ok { + return v + } + case LifecycleScopedRelationship: + if v, ok := any(castLifecycleScopedRelationship(value)).(*T); ok { + return v + } + case Organization: + if v, ok := any(castOrganization(value)).(*T); ok { + return v + } + case Person: + if v, ok := any(castPerson(value)).(*T); ok { + return v + } + case SoftwareAgent: + if v, ok := any(castSoftwareAgent(value)).(*T); ok { + return v + } + case ExpandedlicensingConjunctiveLicenseSet: + if v, ok := any(castExpandedlicensingConjunctiveLicenseSet(value)).(*T); ok { + return v + } + case ExpandedlicensingCustomLicenseAddition: + if v, ok := any(castExpandedlicensingCustomLicenseAddition(value)).(*T); ok { + return v + } + case ExpandedlicensingDisjunctiveLicenseSet: + if v, ok := any(castExpandedlicensingDisjunctiveLicenseSet(value)).(*T); ok { + return v + } + case ExpandedlicensingExtendableLicense: + if v, ok := any(castExpandedlicensingExtendableLicense(value)).(*T); ok { + return v + } + case ExpandedlicensingIndividualLicensingInfo: + if v, ok := any(castExpandedlicensingIndividualLicensingInfo(value)).(*T); ok { + return v + } + case ExpandedlicensingLicense: + if v, ok := any(castExpandedlicensingLicense(value)).(*T); ok { + return v + } + case ExpandedlicensingListedLicense: + if v, ok := any(castExpandedlicensingListedLicense(value)).(*T); ok { + return v + } + case ExpandedlicensingOrLaterOperator: + if v, ok := any(castExpandedlicensingOrLaterOperator(value)).(*T); ok { + return v + } + case ExpandedlicensingWithAdditionOperator: + if v, ok := any(castExpandedlicensingWithAdditionOperator(value)).(*T); ok { + return v + } + case ExtensionCdxPropertiesExtension: + if v, ok := any(castExtensionCdxPropertiesExtension(value)).(*T); ok { + return v + } + case SecurityCvssV2VulnAssessmentRelationship: + if v, ok := any(castSecurityCvssV2VulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SecurityCvssV3VulnAssessmentRelationship: + if v, ok := any(castSecurityCvssV3VulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SecurityCvssV4VulnAssessmentRelationship: + if v, ok := any(castSecurityCvssV4VulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SecurityEpssVulnAssessmentRelationship: + if v, ok := any(castSecurityEpssVulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SecurityExploitCatalogVulnAssessmentRelationship: + if v, ok := any(castSecurityExploitCatalogVulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SecuritySsvcVulnAssessmentRelationship: + if v, ok := any(castSecuritySsvcVulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SecurityVexVulnAssessmentRelationship: + if v, ok := any(castSecurityVexVulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SecurityVulnerability: + if v, ok := any(castSecurityVulnerability(value)).(*T); ok { + return v + } + case SoftwareSoftwareArtifact: + if v, ok := any(castSoftwareSoftwareArtifact(value)).(*T); ok { + return v + } + case Bom: + if v, ok := any(castBom(value)).(*T); ok { + return v + } + case ExpandedlicensingCustomLicense: + if v, ok := any(castExpandedlicensingCustomLicense(value)).(*T); ok { + return v + } + case SecurityVexAffectedVulnAssessmentRelationship: + if v, ok := any(castSecurityVexAffectedVulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SecurityVexFixedVulnAssessmentRelationship: + if v, ok := any(castSecurityVexFixedVulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SecurityVexNotAffectedVulnAssessmentRelationship: + if v, ok := any(castSecurityVexNotAffectedVulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SecurityVexUnderInvestigationVulnAssessmentRelationship: + if v, ok := any(castSecurityVexUnderInvestigationVulnAssessmentRelationship(value)).(*T); ok { + return v + } + case SoftwareFile: + if v, ok := any(castSoftwareFile(value)).(*T); ok { + return v + } + case SoftwarePackage: + if v, ok := any(castSoftwarePackage(value)).(*T); ok { + return v + } + case SoftwareSbom: + if v, ok := any(castSoftwareSbom(value)).(*T); ok { + return v + } + case SoftwareSnippet: + if v, ok := any(castSoftwareSnippet(value)).(*T); ok { + return v + } + case AiAIPackage: + if v, ok := any(castAiAIPackage(value)).(*T); ok { + return v + } + case DatasetDatasetPackage: + if v, ok := any(castDatasetDatasetPackage(value)).(*T); ok { + return v + } + } + panic("invalid type cast, unknown type: " + reflect.TypeOf(t).String()) } -func (o *DatasetPackage) GetAnonymizationMethodUsed() []string { - return o.AnonymizationMethodUsed -} -func (o *DatasetPackage) SetAnonymizationMethodUsed(v ...string) { - o.AnonymizationMethodUsed = v -} -func (o *DatasetPackage) GetConfidentialityLevel() ConfidentialityLevelType { - return o.ConfidentialityLevel -} -func (o *DatasetPackage) SetConfidentialityLevel(v ConfidentialityLevelType) { - o.ConfidentialityLevel = v -} -func (o *DatasetPackage) GetDataCollectionProcess() string { - return o.DataCollectionProcess -} -func (o *DatasetPackage) SetDataCollectionProcess(v string) { - o.DataCollectionProcess = v -} -func (o *DatasetPackage) GetDataPreprocessing() []string { - return o.DataPreprocessing -} -func (o *DatasetPackage) SetDataPreprocessing(v ...string) { - o.DataPreprocessing = v -} -func (o *DatasetPackage) GetDatasetAvailability() DatasetAvailabilityType { - return o.DatasetAvailability -} -func (o *DatasetPackage) SetDatasetAvailability(v DatasetAvailabilityType) { - o.DatasetAvailability = v -} -func (o *DatasetPackage) GetDatasetNoise() string { - return o.DatasetNoise -} -func (o *DatasetPackage) SetDatasetNoise(v string) { - o.DatasetNoise = v +func As[T any](value any, f func(v *T)) { + v := cast[T](value) + if v != nil { + f(v) + } } -func (o *DatasetPackage) GetDatasetSize() uint { - return o.DatasetSize -} -func (o *DatasetPackage) SetDatasetSize(v uint) { - o.DatasetSize = v -} -func (o *DatasetPackage) GetDatasetType() []DatasetType { - return o.DatasetType -} -func (o *DatasetPackage) SetDatasetType(v ...DatasetType) { - o.DatasetType = v -} -func (o *DatasetPackage) GetDatasetUpdateMechanism() string { - return o.DatasetUpdateMechanism -} -func (o *DatasetPackage) SetDatasetUpdateMechanism(v string) { - o.DatasetUpdateMechanism = v -} -func (o *DatasetPackage) GetHasSensitivePersonalInformation() PresenceType { - return o.HasSensitivePersonalInformation -} -func (o *DatasetPackage) SetHasSensitivePersonalInformation(v PresenceType) { - o.HasSensitivePersonalInformation = v -} -func (o *DatasetPackage) GetIntendedUse() string { - return o.IntendedUse -} -func (o *DatasetPackage) SetIntendedUse(v string) { - o.IntendedUse = v -} -func (o *DatasetPackage) GetKnownBias() []string { - return o.KnownBias -} -func (o *DatasetPackage) SetKnownBias(v ...string) { - o.KnownBias = v -} -func (o *DatasetPackage) GetSensor() []IDictionaryEntry { - return o.Sensor -} -func (o *DatasetPackage) SetSensor(v ...IDictionaryEntry) { - o.Sensor = v -} - -var ldGlobal = ldContext{}. - RegisterTypes("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", - &EnergyConsumption{}, - &EnergyConsumptionDescription{}, - &EnergyUnitType{}, - &SafetyRiskAssessmentType{}, - &AnnotationType{}, - &CreationInfo{}, - &DictionaryEntry{}, - &Element{}, - &ElementCollection{}, - &ExternalIdentifier{}, - &ExternalIdentifierType{}, - &ExternalMap{}, - &ExternalRef{}, - &ExternalRefType{}, - &HashAlgorithm{}, - &IntegrityMethod{}, - &LifecycleScopeType{}, - &NamespaceMap{}, - &PackageVerificationCode{}, - &PositiveIntegerRange{}, - &PresenceType{}, - &ProfileIdentifierType{}, - &Relationship{}, - &RelationshipCompleteness{}, - &RelationshipType{}, - &SpdxDocument{}, - &SupportType{}, - &Tool{}, - &ConfidentialityLevelType{}, - &DatasetAvailabilityType{}, - &DatasetType{}, - &LicenseAddition{}, - &ListedLicenseException{}, - &CdxPropertyEntry{}, - &Extension{}, - &CvssSeverityType{}, - &ExploitCatalogType{}, - &SsvcDecisionType{}, - &VexJustificationType{}, - &VulnAssessmentRelationship{}, - &AnyLicenseInfo{}, - &LicenseExpression{}, - &SimpleLicensingText{}, - &ContentIdentifier{}, - &ContentIdentifierType{}, - &FileKindType{}, - &SbomType{}, - &SoftwarePurpose{}, - &Build{}, - &Agent{}, - &Annotation{}, - &Artifact{}, - &Bundle{}, - &Hash{}, - &LifecycleScopedRelationship{}, - &Organization{}, - &Person{}, - &SoftwareAgent{}, - &ConjunctiveLicenseSet{}, - &CustomLicenseAddition{}, - &DisjunctiveLicenseSet{}, - &ExtendableLicense{}, - &IndividualLicensingInfo{}, - &License{}, - &ListedLicense{}, - &OrLaterOperator{}, - &WithAdditionOperator{}, - &CdxPropertiesExtension{}, - &CvssV2VulnAssessmentRelationship{}, - &CvssV3VulnAssessmentRelationship{}, - &CvssV4VulnAssessmentRelationship{}, - &EpssVulnAssessmentRelationship{}, - &ExploitCatalogVulnAssessmentRelationship{}, - &SsvcVulnAssessmentRelationship{}, - &VexVulnAssessmentRelationship{}, - &Vulnerability{}, - &SoftwareArtifact{}, - &Bom{}, - &CustomLicense{}, - &VexAffectedVulnAssessmentRelationship{}, - &VexFixedVulnAssessmentRelationship{}, - &VexNotAffectedVulnAssessmentRelationship{}, - &VexUnderInvestigationVulnAssessmentRelationship{}, - &File{}, - &Package{}, - &Sbom{}, - &Snippet{}, - &AIPackage{}, - &DatasetPackage{}, - ). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &EnergyUnitType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/kilowattHour": "kilowattHour", - "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/megajoule": "megajoule", - "https://spdx.org/rdf/3.0.0/terms/AI/EnergyUnitType/other": "other", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ProfileIdentifierType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/ai": "ai", - "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/build": "build", - "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/core": "core", - "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/dataset": "dataset", - "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/expandedLicensing": "expandedLicensing", - "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/extension": "extension", - "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/lite": "lite", - "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/security": "security", - "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/simpleLicensing": "simpleLicensing", - "https://spdx.org/rdf/3.0.0/terms/Core/ProfileIdentifierType/software": "software", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ExternalIdentifierType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cpe22": "cpe22", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cpe23": "cpe23", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/cve": "cve", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/email": "email", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/gitoid": "gitoid", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/other": "other", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/packageUrl": "packageUrl", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/securityOther": "securityOther", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/swhid": "swhid", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/swid": "swid", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalIdentifierType/urlScheme": "urlScheme", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ExternalRefType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/altDownloadLocation": "altDownloadLocation", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/altWebPage": "altWebPage", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/binaryArtifact": "binaryArtifact", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/bower": "bower", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/buildMeta": "buildMeta", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/buildSystem": "buildSystem", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/certificationReport": "certificationReport", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/chat": "chat", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/componentAnalysisReport": "componentAnalysisReport", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/cwe": "cwe", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/documentation": "documentation", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/dynamicAnalysisReport": "dynamicAnalysisReport", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/eolNotice": "eolNotice", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/exportControlAssessment": "exportControlAssessment", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/funding": "funding", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/issueTracker": "issueTracker", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/license": "license", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/mailingList": "mailingList", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/mavenCentral": "mavenCentral", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/metrics": "metrics", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/npm": "npm", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/nuget": "nuget", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/other": "other", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/privacyAssessment": "privacyAssessment", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/productMetadata": "productMetadata", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/purchaseOrder": "purchaseOrder", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/qualityAssessmentReport": "qualityAssessmentReport", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/releaseHistory": "releaseHistory", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/releaseNotes": "releaseNotes", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/riskAssessment": "riskAssessment", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/runtimeAnalysisReport": "runtimeAnalysisReport", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/secureSoftwareAttestation": "secureSoftwareAttestation", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityAdversaryModel": "securityAdversaryModel", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityAdvisory": "securityAdvisory", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityFix": "securityFix", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityOther": "securityOther", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityPenTestReport": "securityPenTestReport", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityPolicy": "securityPolicy", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/securityThreatModel": "securityThreatModel", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/socialMedia": "socialMedia", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/sourceArtifact": "sourceArtifact", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/staticAnalysisReport": "staticAnalysisReport", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/support": "support", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vcs": "vcs", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vulnerabilityDisclosureReport": "vulnerabilityDisclosureReport", - "https://spdx.org/rdf/3.0.0/terms/Core/ExternalRefType/vulnerabilityExploitabilityAssessment": "vulnerabilityExploitabilityAssessment", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &HashAlgorithm{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b256": "blake2b256", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b384": "blake2b384", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b512": "blake2b512", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake3": "blake3", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsDilithium": "crystalsDilithium", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsKyber": "crystalsKyber", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/falcon": "falcon", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md2": "md2", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md4": "md4", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md5": "md5", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md6": "md6", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/other": "other", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha1": "sha1", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha224": "sha224", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha256": "sha256", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha384": "sha384", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_224": "sha3_224", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_256": "sha3_256", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_384": "sha3_384", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_512": "sha3_512", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha512": "sha512", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &RelationshipCompleteness{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/complete": "complete", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/incomplete": "incomplete", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipCompleteness/noAssertion": "noAssertion", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &RelationshipType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/affects": "affects", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/amendedBy": "amendedBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/ancestorOf": "ancestorOf", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/availableFrom": "availableFrom", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/configures": "configures", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/contains": "contains", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/coordinatedBy": "coordinatedBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/copiedTo": "copiedTo", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/delegatedTo": "delegatedTo", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/dependsOn": "dependsOn", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/descendantOf": "descendantOf", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/describes": "describes", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/doesNotAffect": "doesNotAffect", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/expandsTo": "expandsTo", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/exploitCreatedBy": "exploitCreatedBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/fixedBy": "fixedBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/fixedIn": "fixedIn", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/foundBy": "foundBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/generates": "generates", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAddedFile": "hasAddedFile", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAssessmentFor": "hasAssessmentFor", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasAssociatedVulnerability": "hasAssociatedVulnerability", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasConcludedLicense": "hasConcludedLicense", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDataFile": "hasDataFile", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDeclaredLicense": "hasDeclaredLicense", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDeletedFile": "hasDeletedFile", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDependencyManifest": "hasDependencyManifest", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDistributionArtifact": "hasDistributionArtifact", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDocumentation": "hasDocumentation", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasDynamicLink": "hasDynamicLink", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasEvidence": "hasEvidence", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasExample": "hasExample", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasHost": "hasHost", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasInputs": "hasInputs", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasMetadata": "hasMetadata", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOptionalComponent": "hasOptionalComponent", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOptionalDependency": "hasOptionalDependency", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasOutputs": "hasOutputs", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasPrerequsite": "hasPrerequsite", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasProvidedDependency": "hasProvidedDependency", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasRequirement": "hasRequirement", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasSpecification": "hasSpecification", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasStaticLink": "hasStaticLink", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasTest": "hasTest", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasTestCase": "hasTestCase", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/hasVariant": "hasVariant", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/invokedBy": "invokedBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/modifiedBy": "modifiedBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/other": "other", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/packagedBy": "packagedBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/patchedBy": "patchedBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/publishedBy": "publishedBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/reportedBy": "reportedBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/republishedBy": "republishedBy", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/serializedInArtifact": "serializedInArtifact", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/testedOn": "testedOn", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/trainedOn": "trainedOn", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/underInvestigationFor": "underInvestigationFor", - "https://spdx.org/rdf/3.0.0/terms/Core/RelationshipType/usesTool": "usesTool", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ContentIdentifierType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifierType/gitoid": "gitoid", - "https://spdx.org/rdf/3.0.0/terms/Software/ContentIdentifierType/swhid": "swhid", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &AnnotationType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/AnnotationType/other": "other", - "https://spdx.org/rdf/3.0.0/terms/Core/AnnotationType/review": "review", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SupportType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/deployed": "deployed", - "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/development": "development", - "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/endOfSupport": "endOfSupport", - "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/limitedSupport": "limitedSupport", - "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/noAssertion": "noAssertion", - "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/noSupport": "noSupport", - "https://spdx.org/rdf/3.0.0/terms/Core/SupportType/support": "support", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &HashAlgorithm{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b256": "blake2b256", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b384": "blake2b384", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake2b512": "blake2b512", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/blake3": "blake3", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsDilithium": "crystalsDilithium", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/crystalsKyber": "crystalsKyber", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/falcon": "falcon", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md2": "md2", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md4": "md4", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md5": "md5", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/md6": "md6", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/other": "other", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha1": "sha1", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha224": "sha224", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha256": "sha256", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha384": "sha384", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_224": "sha3_224", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_256": "sha3_256", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_384": "sha3_384", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha3_512": "sha3_512", - "https://spdx.org/rdf/3.0.0/terms/Core/HashAlgorithm/sha512": "sha512", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &LifecycleScopeType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/build": "build", - "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/design": "design", - "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/development": "development", - "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/other": "other", - "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/runtime": "runtime", - "https://spdx.org/rdf/3.0.0/terms/Core/LifecycleScopeType/test": "test", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &CvssSeverityType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/critical": "critical", - "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/high": "high", - "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/low": "low", - "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/medium": "medium", - "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/none": "none", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &CvssSeverityType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/critical": "critical", - "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/high": "high", - "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/low": "low", - "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/medium": "medium", - "https://spdx.org/rdf/3.0.0/terms/Security/CvssSeverityType/none": "none", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ExploitCatalogType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogType/kev": "kev", - "https://spdx.org/rdf/3.0.0/terms/Security/ExploitCatalogType/other": "other", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SsvcDecisionType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/act": "act", - "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/attend": "attend", - "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/track": "track", - "https://spdx.org/rdf/3.0.0/terms/Security/SsvcDecisionType/trackStar": "trackStar", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SoftwarePurpose{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/application": "application", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/archive": "archive", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/bom": "bom", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/configuration": "configuration", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/container": "container", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/data": "data", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/device": "device", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/deviceDriver": "deviceDriver", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/diskImage": "diskImage", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/documentation": "documentation", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/evidence": "evidence", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/executable": "executable", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/file": "file", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/filesystemImage": "filesystemImage", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/firmware": "firmware", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/framework": "framework", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/install": "install", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/library": "library", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/manifest": "manifest", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/model": "model", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/module": "module", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/operatingSystem": "operatingSystem", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/other": "other", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/patch": "patch", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/platform": "platform", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/requirement": "requirement", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/source": "source", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/specification": "specification", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/test": "test", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SoftwarePurpose{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/application": "application", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/archive": "archive", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/bom": "bom", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/configuration": "configuration", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/container": "container", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/data": "data", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/device": "device", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/deviceDriver": "deviceDriver", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/diskImage": "diskImage", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/documentation": "documentation", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/evidence": "evidence", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/executable": "executable", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/file": "file", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/filesystemImage": "filesystemImage", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/firmware": "firmware", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/framework": "framework", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/install": "install", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/library": "library", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/manifest": "manifest", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/model": "model", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/module": "module", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/operatingSystem": "operatingSystem", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/other": "other", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/patch": "patch", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/platform": "platform", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/requirement": "requirement", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/source": "source", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/specification": "specification", - "https://spdx.org/rdf/3.0.0/terms/Software/SoftwarePurpose/test": "test", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &VexJustificationType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/componentNotPresent": "componentNotPresent", - "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/inlineMitigationsAlreadyExist": "inlineMitigationsAlreadyExist", - "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeCannotBeControlledByAdversary": "vulnerableCodeCannotBeControlledByAdversary", - "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeNotInExecutePath": "vulnerableCodeNotInExecutePath", - "https://spdx.org/rdf/3.0.0/terms/Security/VexJustificationType/vulnerableCodeNotPresent": "vulnerableCodeNotPresent", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &FileKindType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Software/FileKindType/directory": "directory", - "https://spdx.org/rdf/3.0.0/terms/Software/FileKindType/file": "file", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SbomType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/analyzed": "analyzed", - "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/build": "build", - "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/deployed": "deployed", - "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/design": "design", - "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/runtime": "runtime", - "https://spdx.org/rdf/3.0.0/terms/Software/SbomType/source": "source", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &PresenceType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/no": "no", - "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/noAssertion": "noAssertion", - "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/yes": "yes", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &SafetyRiskAssessmentType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/high": "high", - "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/low": "low", - "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/medium": "medium", - "https://spdx.org/rdf/3.0.0/terms/AI/SafetyRiskAssessmentType/serious": "serious", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &PresenceType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/no": "no", - "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/noAssertion": "noAssertion", - "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/yes": "yes", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &ConfidentialityLevelType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/amber": "amber", - "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/clear": "clear", - "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/green": "green", - "https://spdx.org/rdf/3.0.0/terms/Dataset/ConfidentialityLevelType/red": "red", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &DatasetAvailabilityType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/clickthrough": "clickthrough", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/directDownload": "directDownload", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/query": "query", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/registration": "registration", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetAvailabilityType/scrapingScript": "scrapingScript", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &DatasetType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/audio": "audio", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/categorical": "categorical", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/graph": "graph", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/image": "image", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/noAssertion": "noAssertion", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/numeric": "numeric", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/other": "other", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/sensor": "sensor", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/structured": "structured", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/syntactic": "syntactic", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/text": "text", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/timeseries": "timeseries", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/timestamp": "timestamp", - "https://spdx.org/rdf/3.0.0/terms/Dataset/DatasetType/video": "video", - }). - IRIMap("https://spdx.org/rdf/3.0.0/spdx-context.jsonld", &PresenceType{}, map[string]string{ - "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/no": "no", - "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/noAssertion": "noAssertion", - "https://spdx.org/rdf/3.0.0/terms/Core/PresenceType/yes": "yes", - }) diff --git a/spdx/v3/v3_0/relationships.go b/spdx/v3/v3_0/relationships.go deleted file mode 100644 index e19fa221..00000000 --- a/spdx/v3/v3_0/relationships.go +++ /dev/null @@ -1,15 +0,0 @@ -package v3_0 - -type Relationships struct { - relationships []IRelationship -} - -func (r Relationships) From(element IElement) Relationships { - var out []IRelationship - for _, r := range r.relationships { - if r.GetFrom() == element { - out = append(out, r) - } - } - return Relationships{out} -} diff --git a/spdx/v3/v3_0/spdx.go b/spdx/v3/v3_0/spdx.go index 6744952e..ea121e61 100644 --- a/spdx/v3/v3_0/spdx.go +++ b/spdx/v3/v3_0/spdx.go @@ -1,105 +1,82 @@ package v3_0 import ( - "encoding/json" "fmt" - "io" "math/rand" "reflect" "time" ) /* -SPDX 3 models and serialization code is generated from prototype golang support for shacl2code, -https://github.com/kzantow-anchore/shacl2code/tree/golang-bindings (with contributions from Nisha and Keith) +SPDX 3 models and serialization code is generated from some different prototype golang support for shacl2code, in: https://github.com/kzantow-anchore/shacl2code To regenerate, use something like this command: -.venv/bin/python -m shacl2code generate -i https://spdx.org/rdf/3.0.0/spdx-model.ttl -i https://spdx.org/rdf/3.0.0/spdx-json-serialize-annotations.ttl -x https://spdx.org/rdf/3.0.0/spdx-context.jsonld golang --package v3_0 --license MIT --output $HOME/projects/tools-golang/spdx/v3/v3_0/model.go --remap-props element=elements,extension=extensions,externalIdentifier=externalIdentifiers,externalRef=externalRefs,rootElement=rootElements +.venv/bin/python -m shacl2code generate -i https://spdx.org/rdf/3.0.1/spdx-model.ttl -i https://spdx.org/rdf/3.0.1/spdx-json-serialize-annotations.ttl -x https://spdx.org/rdf/3.0.1/spdx-context.jsonld golang +--package v3_0 --license MIT +--output $HOME/projects/tools-golang/spdx/v3/v3_0/model.go +--remap-props element=elements,extension=extensions,externalIdentifier=externalIdentifiers,externalRef=externalRefs,rootElement=rootElements */ type Document struct { - creationInfo *CreationInfo - document *SpdxDocument - graph []any - ldc ldContext + *SpdxDocument + graph []any + //ldc ldContext } -func NewDocument(creator IAgent) *Document { +func NewDocument(conformance ProfileIdentifierType, name string, createdBy AnyAgent, createdUsing AnyTool) *Document { ci := &CreationInfo{ - Created: time.Now().Format(time.RFC3339), - CreatedBy: []IAgent{ - creator, - }, + Created: time.Now(), + CreatedBys: AgentList{createdBy}, + CreatedUsings: ToolList{createdUsing}, } - creator.SetCreationInfo(ci) return &Document{ - creationInfo: ci, - document: &SpdxDocument{ - CreationInfo: ci, + SpdxDocument: &SpdxDocument{ + ElementCollection: ElementCollection{ + Element: Element{ + Name: name, + CreationInfo: ci, + }, + ProfileConformances: []ProfileIdentifierType{conformance}, + }, }, - graph: []any{ci, creator}, - ldc: ldGlobal, + graph: []any{ci}, + //ldc: ldGlobal, } } -func (d *Document) CreationInfo() ICreationInfo { - return d.creationInfo -} - -func (d *Document) AddElement(e ...IElement) { - d.document.RootElements = append(d.document.RootElements, e...) - d.document.Elements = append(d.document.Elements, e...) -} - -func (d *Document) GetElements() []IElement { - return d.document.RootElements -} - -func (d *Document) Document() *SpdxDocument { - return d.document -} - -func (d *Document) Packages() []IPackage { - return get[IPackage](d) -} - -func (d *Document) Relationships() Relationships { - return Relationships{get[IRelationship](d)} -} - -func (d *Document) Files() []IFile { - return get[IFile](d) -} - -func (d *Document) ToJSON(writer io.Writer) error { - if d.document == nil { - return fmt.Errorf("no document object created") - } - // all IElement need to have creationInfo set... - if d.creationInfo != nil { - d.setCreationInfo(d.creationInfo, d.document) - } - // all IElement need to have spdxID... - if makeIdGenerator != nil { - idGen := makeIdGenerator(d.document) - if d.document.GetSpdxId() == "" { - d.document.SetSpdxId(idGen(d.document)) - } - d.ensureSpdxIDs(d.document, idGen) - } - - maps, err := d.ldc.toMaps(d.document) - if err != nil { - return err - } - enc := json.NewEncoder(writer) - enc.SetEscapeHTML(false) - enc.SetIndent("", " ") - return enc.Encode(maps) -} - -func (d *Document) setCreationInfo(creationInfo ICreationInfo, doc ISpdxDocument) { - iCreationInfoType := reflect.TypeOf((*ICreationInfo)(nil)).Elem() +func (d *Document) Append(e ...AnyElement) { + d.SpdxDocument.RootElements = append(d.SpdxDocument.RootElements, e...) + d.SpdxDocument.Elements = append(d.SpdxDocument.Elements, e...) +} + +//func (d *Document) ToJSON(writer io.Writer) error { +// if d.SpdxDocument == nil { +// return fmt.Errorf("no document object created") +// } +// // all IElement need to have creationInfo set... +// d.setCreationInfo(d.SpdxDocument.CreationInfo, d.SpdxDocument) +// +// // all IElement need to have spdxID... +// if makeIdGenerator != nil { +// idGen := makeIdGenerator(d.SpdxDocument) +// if d.SpdxDocument.ID == "" { +// d.SpdxDocument.ID = idGen(d.SpdxDocument) +// } +// d.ensureSpdxIDs(d.SpdxDocument, idGen) +// } +// +// maps, err := d.ldc.toMaps(d.SpdxDocument) +// if err != nil { +// return err +// } +// enc := json.NewEncoder(writer) +// enc.SetEscapeHTML(false) +// enc.SetIndent("", " ") +// return enc.Encode(maps) +//} + +func (d *Document) setCreationInfo(creationInfo AnyCreationInfo, doc *SpdxDocument) { + iCreationInfoType := reflect.TypeOf((*AnyCreationInfo)(nil)).Elem() ci := reflect.ValueOf(creationInfo) _ = visitObjectGraph(map[reflect.Value]struct{}{}, reflect.ValueOf(doc), func(v reflect.Value) error { t := v.Type() @@ -110,35 +87,45 @@ func (d *Document) setCreationInfo(creationInfo ICreationInfo, doc ISpdxDocument }) } -func (d *Document) ensureSpdxIDs(doc ISpdxDocument, idGen idGenerator) { - iElementType := reflect.TypeOf((*IElement)(nil)).Elem() +func (d *Document) ensureSpdxIDs(doc *SpdxDocument, idGen idGenerator) { + iElementType := reflect.TypeOf((*AnyElement)(nil)).Elem() _ = visitObjectGraph(map[reflect.Value]struct{}{}, reflect.ValueOf(doc), func(v reflect.Value) error { if v.Type().Implements(iElementType) { - el, ok := v.Interface().(IElement) - if ok && el.GetSpdxId() == "" { - el.SetSpdxId(idGen(el)) + el, ok := v.Interface().(AnyElement) + if ok { + e := el.asElement() + if e != nil && e.ID == "" { + e.ID = idGen(el) + } } } return nil }) } -type idGenerator func(e IElement) string +type idGenerator func(e any) string -var makeIdGenerator = func(doc ISpdxDocument) idGenerator { +var makeIdGenerator = func(doc *SpdxDocument) idGenerator { nextID := map[reflect.Type]uint{} - return func(e IElement) string { - if _, ok := e.(ISpdxDocument); ok { + return func(e any) string { + if _, ok := e.(*SpdxDocument); ok { return fmt.Sprintf("%v", rand.Uint64()) } t := baseType(reflect.TypeOf(e)) // should these be blank nodes? id := nextID[t] + 1 nextID[t] = id - return fmt.Sprintf("_:%v-%v-%v", doc.GetSpdxId(), t.Name(), id) + return fmt.Sprintf("_:%v-%v-%v", doc.ID, t.Name(), id) } } +func baseType(t reflect.Type) reflect.Type { + for t.Kind() == reflect.Ptr { + t = t.Elem() + } + return t +} + func visitObjectGraph(visited map[reflect.Value]struct{}, v reflect.Value, visitor func(reflect.Value) error) error { if _, ok := visited[v]; ok { return nil @@ -180,27 +167,17 @@ func visitObjectGraph(visited map[reflect.Value]struct{}, v reflect.Value, visit return nil } -func (d *Document) FromJSON(reader io.Reader) error { - graph, err := d.ldc.FromJSON(reader) - if err != nil { - return err - } - d.graph = append(d.graph, graph) - for _, e := range graph { - if doc, ok := e.(*SpdxDocument); ok { - d.document = doc - return nil - } - } - return fmt.Errorf("no document found") -} - -func get[T any](ctx *Document) []T { - var out []T - for _, i := range ctx.graph { - if i, ok := i.(T); ok { - out = append(out, i) - } - } - return out -} +//func (d *Document) FromJSON(reader io.Reader) error { +// graph, err := d.ldc.FromJSON(reader) +// if err != nil { +// return err +// } +// d.graph = append(d.graph, graph) +// for _, e := range graph { +// if doc, ok := e.(*SpdxDocument); ok { +// d.SpdxDocument = doc +// return nil +// } +// } +// return fmt.Errorf("no document found") +//} diff --git a/spdx/v3/v3_0/spdx_test.go b/spdx/v3/v3_0/spdx_test.go index 04db91d5..808a9617 100644 --- a/spdx/v3/v3_0/spdx_test.go +++ b/spdx/v3/v3_0/spdx_test.go @@ -1,26 +1,22 @@ package v3_0_test import ( - "bytes" - "fmt" - "strings" "testing" - "github.com/pmezard/go-difflib/difflib" - spdx "github.com/spdx/tools-golang/spdx/v3/v3_0" ) func Test_exportImportExport(t *testing.T) { - doc := spdx.NewDocument(&spdx.SoftwareAgent{ - Name: "tools-golang", - Summary: "a summary", - }) - doc.Document().SetProfileConformance(spdx.ProfileIdentifierType_Software) - - doc.CreationInfo().SetCreatedUsing( - &spdx.Tool{ - ExternalIdentifiers: []spdx.IExternalIdentifier{ + // create a document + doc := spdx.NewDocument( + spdx.ProfileIdentifierType_Software, + "My Document", + &spdx.SoftwareAgent{Agent: spdx.Agent{Element: spdx.Element{ + Name: "tools-golang", + Summary: "a summary", + }}}, + &spdx.Tool{Element: spdx.Element{ + ExternalIdentifiers: spdx.ExternalIdentifierList{ &spdx.ExternalIdentifier{ ExternalIdentifierType: spdx.ExternalIdentifierType_Cpe23, Identifier: "cpe:2.3:a:myvendor:my-product:*:*:*:*:*:*:*:*", @@ -28,106 +24,112 @@ func Test_exportImportExport(t *testing.T) { }, ExternalRefs: nil, Name: "not-tools-golang", - }, - ) + }}) - doc.Document().SetName("My Document") + sbom := &spdx.SoftwareSbom{} + doc.RootElements.Append(sbom) - // add a package + // create a package - pkg1 := &spdx.Package{ - Name: "some-package-1", - PackageVersion: "1.2.3", + pkg1 := &spdx.SoftwarePackage{ + SoftwareSoftwareArtifact: spdx.SoftwareSoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ + Name: "some-package-1", + }}}, + SoftwarePackageVersion: "1.2.3", } - pkg2 := &spdx.Package{ - Name: "some-package-2", - PackageVersion: "2.4.5", - } - doc.AddElement(pkg1, pkg2) - - file1 := &spdx.File{ - Name: "/bin/bash", - } - doc.AddElement(file1) - - // add relationships - doc.AddElement( - &spdx.Relationship{ - From: file1, - RelationshipType: spdx.RelationshipType_Contains, - To: []spdx.IElement{ - pkg1, - pkg2, - }, - }, - ) - - doc.AddElement( - &spdx.Relationship{ - From: pkg1, - RelationshipType: spdx.RelationshipType_DependsOn, - To: []spdx.IElement{ - pkg2, - }, - }, - ) + // create another package - // serialize + pkg2 := &spdx.AiAIPackage{} + pkg2.Name = "some-package-2" + pkg2.SoftwarePackageVersion = "2.4.5" - buf := bytes.Buffer{} - err := doc.ToJSON(&buf) - if err != nil { - t.Error(err) - } - - json1 := buf.String() - fmt.Printf("--------- initial JSON: ----------\n%s\n\n", json1) + // add the packages to the sbom - // deserialize to a new document + sbom.RootElements.Append(pkg1, pkg2) - doc = spdx.NewDocument(&spdx.SoftwareAgent{}) - err = doc.FromJSON(strings.NewReader(json1)) - if err != nil { - t.Error(err) - } + // add a file - // re-serialize + file1 := &spdx.SoftwareFile{SoftwareSoftwareArtifact: spdx.SoftwareSoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ + Name: "/bin/bash", + }}}} + sbom.RootElements.Append(file1) - buf.Reset() - err = doc.ToJSON(&buf) - if err != nil { - t.Error(err) - } - json2 := buf.String() - fmt.Printf("--------- reserialized JSON: ----------\n%s\n", json2) + // add relationships - // compare original to parsed and re-encoded + sbom.RootElements.Append(&spdx.Relationship{ + From: file1, + RelationshipType: spdx.RelationshipType_Contains, + Tos: spdx.ElementList{ + pkg1, + pkg2, + }, + }) - diff := difflib.UnifiedDiff{ - A: difflib.SplitLines(json1), - B: difflib.SplitLines(json2), - FromFile: "Original", - ToFile: "Current", - Context: 3, - } - text, _ := difflib.GetUnifiedDiffString(diff) - if text != "" { - t.Errorf(text) - } + sbom.RootElements.Append(&spdx.Relationship{ + From: pkg1, + RelationshipType: spdx.RelationshipType_DependsOn, + Tos: spdx.ElementList{ + pkg2, + }, + }) - // some basic verification: + // serialize - var pkgs []spdx.IPackage - for _, e := range doc.GetElements() { - if rel, ok := e.(spdx.IRelationship); ok && rel.GetRelationshipType() == spdx.RelationshipType_Contains { - if from, ok := rel.GetFrom().(spdx.IFile); ok && from.GetName() == "/bin/bash" { - for _, el := range rel.GetTo() { - if pkg, ok := el.(spdx.IPackage); ok { - pkgs = append(pkgs, pkg) + //buf := bytes.Buffer{} + //err := doc.ToJSON(&buf) + //if err != nil { + // t.Error(err) + //} + // + //json1 := buf.String() + //fmt.Printf("--------- initial JSON: ----------\n%s\n\n", json1) + // + //// deserialize to a new document + // + //doc = spdx.NewDocument(&spdx.SoftwareAgent{}) + //err = doc.FromJSON(strings.NewReader(json1)) + //if err != nil { + // t.Error(err) + //} + // + //// re-serialize + // + //buf.Reset() + //err = doc.ToJSON(&buf) + //if err != nil { + // t.Error(err) + //} + //json2 := buf.String() + //fmt.Printf("--------- reserialized JSON: ----------\n%s\n", json2) + // + //// compare original to parsed and re-encoded + // + //diff := difflib.UnifiedDiff{ + // A: difflib.SplitLines(json1), + // B: difflib.SplitLines(json2), + // FromFile: "Original", + // ToFile: "Current", + // Context: 3, + //} + //text, _ := difflib.GetUnifiedDiffString(diff) + //if text != "" { + // t.Errorf(text) + //} + + // some basic usage: + + var pkgs []*spdx.SoftwarePackage + for _, sbom := range doc.RootElements.SoftwareSbomIter() { + for _, rel := range sbom.RootElements.RelationshipIter() { + if rel.RelationshipType == spdx.RelationshipType_Contains { + spdx.As(rel.From, func(f *spdx.SoftwareFile) { + if f.Name == "/bin/bash" { + for _, pkg := range rel.Tos.SoftwarePackageIter() { + pkgs = append(pkgs, pkg) + } } - } - + }) } } } @@ -137,75 +139,76 @@ func Test_exportImportExport(t *testing.T) { } func Test_aiProfile(t *testing.T) { - doc := spdx.NewDocument(&spdx.SoftwareAgent{ + doc := spdx.NewDocument(spdx.ProfileIdentifierType_Ai, "", &spdx.SoftwareAgent{Agent: spdx.Agent{Element: spdx.Element{ Name: "tools-golang", Summary: "a summary", - }) - doc.Document().SetProfileConformance(spdx.ProfileIdentifierType_Ai) - - aiPkg := &spdx.AIPackage{ - Name: "some ai package", - EnergyConsumption: &spdx.EnergyConsumption{ - FinetuningEnergyConsumption: []spdx.IEnergyConsumptionDescription{ - &spdx.EnergyConsumptionDescription{ - EnergyQuantity: 1.2, - EnergyUnit: spdx.EnergyUnitType_KilowattHour, + }}}, nil) + + aiPkg := &spdx.AiAIPackage{ + SoftwarePackage: spdx.SoftwarePackage{SoftwareSoftwareArtifact: spdx.SoftwareSoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ + Name: "some ai package", + }}}}, + AiEnergyConsumption: &spdx.AiEnergyConsumption{ + AiFinetuningEnergyConsumptions: spdx.AiEnergyConsumptionDescriptionList{ + &spdx.AiEnergyConsumptionDescription{ + AiEnergyQuantity: 1.2, + AiEnergyUnit: spdx.AiEnergyUnitType_KilowattHour, }, }, - TrainingEnergyConsumption: []spdx.IEnergyConsumptionDescription{ - &spdx.EnergyConsumptionDescription{ - EnergyQuantity: 5032402, - EnergyUnit: spdx.EnergyUnitType_KilowattHour, + AiTrainingEnergyConsumptions: spdx.AiEnergyConsumptionDescriptionList{ + &spdx.AiEnergyConsumptionDescription{ + AiEnergyQuantity: 5032402, + AiEnergyUnit: spdx.AiEnergyUnitType_KilowattHour, }, }, }, - TypeOfModel: []string{ + AiTypeOfModels: []string{ "Llama 3 8B", }, } - doc.AddElement(aiPkg) + doc.RootElements.Append(aiPkg) // serialize - buf := bytes.Buffer{} - err := doc.ToJSON(&buf) - if err != nil { - t.Error(err) - } - - json1 := buf.String() - fmt.Printf("--------- initial JSON: ----------\n%s\n\n", json1) - - // deserialize to a new document - - doc = spdx.NewDocument(&spdx.SoftwareAgent{}) - err = doc.FromJSON(strings.NewReader(json1)) - if err != nil { - t.Error(err) - } - - // re-serialize - - buf.Reset() - err = doc.ToJSON(&buf) - if err != nil { - t.Error(err) - } - json2 := buf.String() - fmt.Printf("--------- reserialized JSON: ----------\n%s\n", json2) - - // compare original to parsed and re-encoded - - diff := difflib.UnifiedDiff{ - A: difflib.SplitLines(json1), - B: difflib.SplitLines(json2), - FromFile: "Original", - ToFile: "Current", - Context: 3, - } - text, _ := difflib.GetUnifiedDiffString(diff) - if text != "" { - t.Errorf(text) - } + //buf := bytes.Buffer{} + //err := doc.ToJSON(&buf) + //if err != nil { + // t.Error(err) + //} + // + //json1 := buf.String() + //fmt.Printf("--------- initial JSON: ----------\n%s\n\n", json1) + // + //// deserialize to a new document + // + //doc = spdx.NewDocument(&spdx.SoftwareAgent{}) + //err = doc.FromJSON(strings.NewReader(json1)) + //if err != nil { + // t.Error(err) + //} + // + //// re-serialize + // + //buf.Reset() + //err = doc.ToJSON(&buf) + //if err != nil { + // t.Error(err) + //} + //json2 := buf.String() + //fmt.Printf("--------- reserialized JSON: ----------\n%s\n", json2) + // + //// compare original to parsed and re-encoded + // + //diff := difflib.UnifiedDiff{ + // A: difflib.SplitLines(json1), + // B: difflib.SplitLines(json2), + // FromFile: "Original", + // ToFile: "Current", + // Context: 3, + //} + //text, _ := difflib.GetUnifiedDiffString(diff) + //if text != "" { + // t.Errorf(text) + //} } diff --git a/spdx/v3/v3_0/util.go b/spdx/v3/v3_0/util.go new file mode 100644 index 00000000..2b75336f --- /dev/null +++ b/spdx/v3/v3_0/util.go @@ -0,0 +1,38 @@ +// This file was automatically generated by __main__.py. DO NOT MANUALLY MODIFY IT +// +// SPDX-License-Identifier: 0BSD + +package v3_0 + +import ( + "iter" +) + +func typeIter[T any, E any](values []E, cast func(any) *T) iter.Seq2[E, *T] { + if values == nil { + return func(yield func(E, *T) bool) {} + } + return func(yield func(E, *T) bool) { + for _, value := range values { + v := cast(value) + if v != nil { + if !yield(value, v) { + return + } + } + } + } +} + +func remove[T comparable, E ~[]T](slice *E, value T) { + if slice == nil { + return + } + s := *slice + for i := 0; i < len(*slice); i++ { + if s[i] == value { + *slice = append(s[0:i], s[:i+1]...) + i-- + } + } +} diff --git a/spdx/v3/v3_0/validator.go b/spdx/v3/v3_0/validator.go new file mode 100644 index 00000000..05ea49ed --- /dev/null +++ b/spdx/v3/v3_0/validator.go @@ -0,0 +1,1846 @@ +// This file was automatically generated by __main__.py. DO NOT MANUALLY MODIFY IT +// +// SPDX-License-Identifier: 0BSD + +package v3_0 + +import ( + "fmt" + "slices" + "strconv" + "strings" +) + +type ValidationError struct { + Path []string + Err error +} + +func (v ValidationError) String() string { + return strings.Join(v.Path, ".") + ": " + v.Err.Error() +} + +func (v ValidationError) Error() string { + return v.String() +} + +func newValidationError(path []string, err error) ValidationError { + return ValidationError{ + Path: path, + Err: err, + } +} + +type validator interface { + Validate(visited map[any]struct{}, path ...string) []ValidationError +} + +func validateInValues(path []string, value string, valid ...string) []ValidationError { + if slices.Contains(valid, value) { + return nil + } + return []ValidationError{newValidationError(path, fmt.Errorf("invalid value: '%v', expected: %v", value, valid))} +} + +func (o *AiEnergyConsumption) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + for i, v := range o.AiFinetuningEnergyConsumptions { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "AiFinetuningEnergyConsumptions", strconv.Itoa(i))...)...) + } + } + + for i, v := range o.AiInferenceEnergyConsumptions { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "AiInferenceEnergyConsumptions", strconv.Itoa(i))...)...) + } + } + + for i, v := range o.AiTrainingEnergyConsumptions { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "AiTrainingEnergyConsumptions", strconv.Itoa(i))...)...) + } + } + + return errs +} + +func (o *AiEnergyConsumptionDescription) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + // TODO: check for required + + if o.AiEnergyUnit.ID == "" { + errs = append(errs, newValidationError(append(path, "AiEnergyUnit"), fmt.Errorf("required"))) + } + errs = append(errs, o.AiEnergyUnit.Validate(visited, append(path, "AiEnergyUnit")...)...) + + return errs +} + +func (o *AiEnergyUnitType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, AiEnergyUnitType_KilowattHour.ID, AiEnergyUnitType_Megajoule.ID, AiEnergyUnitType_Other.ID)...) + + return errs +} + +func (o *AiSafetyRiskAssessmentType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, AiSafetyRiskAssessmentType_High.ID, AiSafetyRiskAssessmentType_Low.ID, AiSafetyRiskAssessmentType_Medium.ID, AiSafetyRiskAssessmentType_Serious.ID)...) + + return errs +} + +func (o *AnnotationType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, AnnotationType_Other.ID, AnnotationType_Review.ID)...) + + return errs +} + +func (o *CreationInfo) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + // TODO: check for required + + // TODO: check for required + + for i, v := range o.CreatedBys { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "CreatedBys", strconv.Itoa(i))...)...) + } + } + + for i, v := range o.CreatedUsings { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "CreatedUsings", strconv.Itoa(i))...)...) + } + } + + // TODO: check for required + return errs +} + +func (o *DictionaryEntry) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *Element) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + // TODO: check for required + + if v, ok := o.CreationInfo.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "CreationInfo")...)...) + } + + // TODO: check for required + + for i, v := range o.Extensions { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "Extensions", strconv.Itoa(i))...)...) + } + } + + for i, v := range o.ExternalIdentifiers { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "ExternalIdentifiers", strconv.Itoa(i))...)...) + } + } + + for i, v := range o.ExternalRefs { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "ExternalRefs", strconv.Itoa(i))...)...) + } + } + + // TODO: check for required + + // TODO: check for required + + for i, v := range o.VerifiedUsings { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "VerifiedUsings", strconv.Itoa(i))...)...) + } + } + + return errs +} + +func (o *ElementCollection) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Element.Validate(visited, path...)...) + + for i, v := range o.Elements { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "Elements", strconv.Itoa(i))...)...) + } + } + + for _, v := range o.ProfileConformances { + errs = append(errs, v.Validate(visited, append(path, "ProfileConformances")...)...) + } + + for i, v := range o.RootElements { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "RootElements", strconv.Itoa(i))...)...) + } + } + + return errs +} + +func (o *ExternalIdentifier) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + // TODO: check for required + + if o.ExternalIdentifierType.ID == "" { + errs = append(errs, newValidationError(append(path, "ExternalIdentifierType"), fmt.Errorf("required"))) + } + errs = append(errs, o.ExternalIdentifierType.Validate(visited, append(path, "ExternalIdentifierType")...)...) + + // TODO: check for required + + // TODO: check for required/min/max/etc. + + // TODO: check for required + return errs +} + +func (o *ExternalIdentifierType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, ExternalIdentifierType_Cpe22.ID, ExternalIdentifierType_Cpe23.ID, ExternalIdentifierType_Cve.ID, ExternalIdentifierType_Email.ID, ExternalIdentifierType_Gitoid.ID, ExternalIdentifierType_Other.ID, ExternalIdentifierType_PackageUrl.ID, ExternalIdentifierType_SecurityOther.ID, ExternalIdentifierType_Swhid.ID, ExternalIdentifierType_Swid.ID, ExternalIdentifierType_UrlScheme.ID)...) + + return errs +} + +func (o *ExternalMap) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + if v, ok := o.DefiningArtifact.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "DefiningArtifact")...)...) + } + + // TODO: check for required + + // TODO: check for required + + for i, v := range o.VerifiedUsings { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "VerifiedUsings", strconv.Itoa(i))...)...) + } + } + + return errs +} + +func (o *ExternalRef) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + // TODO: check for required + + // TODO: check for required + + errs = append(errs, o.ExternalRefType.Validate(visited, append(path, "ExternalRefType")...)...) + + // TODO: check for required/min/max/etc. + + return errs +} + +func (o *ExternalRefType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, ExternalRefType_AltDownloadLocation.ID, ExternalRefType_AltWebPage.ID, ExternalRefType_BinaryArtifact.ID, ExternalRefType_Bower.ID, ExternalRefType_BuildMeta.ID, ExternalRefType_BuildSystem.ID, ExternalRefType_CertificationReport.ID, ExternalRefType_Chat.ID, ExternalRefType_ComponentAnalysisReport.ID, ExternalRefType_Cwe.ID, ExternalRefType_Documentation.ID, ExternalRefType_DynamicAnalysisReport.ID, ExternalRefType_EolNotice.ID, ExternalRefType_ExportControlAssessment.ID, ExternalRefType_Funding.ID, ExternalRefType_IssueTracker.ID, ExternalRefType_License.ID, ExternalRefType_MailingList.ID, ExternalRefType_MavenCentral.ID, ExternalRefType_Metrics.ID, ExternalRefType_Npm.ID, ExternalRefType_Nuget.ID, ExternalRefType_Other.ID, ExternalRefType_PrivacyAssessment.ID, ExternalRefType_ProductMetadata.ID, ExternalRefType_PurchaseOrder.ID, ExternalRefType_QualityAssessmentReport.ID, ExternalRefType_ReleaseHistory.ID, ExternalRefType_ReleaseNotes.ID, ExternalRefType_RiskAssessment.ID, ExternalRefType_RuntimeAnalysisReport.ID, ExternalRefType_SecureSoftwareAttestation.ID, ExternalRefType_SecurityAdversaryModel.ID, ExternalRefType_SecurityAdvisory.ID, ExternalRefType_SecurityFix.ID, ExternalRefType_SecurityOther.ID, ExternalRefType_SecurityPenTestReport.ID, ExternalRefType_SecurityPolicy.ID, ExternalRefType_SecurityThreatModel.ID, ExternalRefType_SocialMedia.ID, ExternalRefType_SourceArtifact.ID, ExternalRefType_StaticAnalysisReport.ID, ExternalRefType_Support.ID, ExternalRefType_Vcs.ID, ExternalRefType_VulnerabilityDisclosureReport.ID, ExternalRefType_VulnerabilityExploitabilityAssessment.ID)...) + + return errs +} + +func (o *HashAlgorithm) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, HashAlgorithm_Adler32.ID, HashAlgorithm_Blake2b256.ID, HashAlgorithm_Blake2b384.ID, HashAlgorithm_Blake2b512.ID, HashAlgorithm_Blake3.ID, HashAlgorithm_CrystalsDilithium.ID, HashAlgorithm_CrystalsKyber.ID, HashAlgorithm_Falcon.ID, HashAlgorithm_Md2.ID, HashAlgorithm_Md4.ID, HashAlgorithm_Md5.ID, HashAlgorithm_Md6.ID, HashAlgorithm_Other.ID, HashAlgorithm_Sha1.ID, HashAlgorithm_Sha224.ID, HashAlgorithm_Sha256.ID, HashAlgorithm_Sha384.ID, HashAlgorithm_Sha3224.ID, HashAlgorithm_Sha3256.ID, HashAlgorithm_Sha3384.ID, HashAlgorithm_Sha3512.ID, HashAlgorithm_Sha512.ID)...) + + return errs +} + +func (o *IndividualElement) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Element.Validate(visited, path...)...) + + errs = append(errs, validateInValues(path, o.ID, IndividualElement_NoAssertionElement.ID, IndividualElement_NoneElement.ID)...) + + return errs +} + +func (o *IntegrityMethod) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + // TODO: check for required + return errs +} + +func (o *LifecycleScopeType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, LifecycleScopeType_Build.ID, LifecycleScopeType_Design.ID, LifecycleScopeType_Development.ID, LifecycleScopeType_Other.ID, LifecycleScopeType_Runtime.ID, LifecycleScopeType_Test.ID)...) + + return errs +} + +func (o *NamespaceMap) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *PackageVerificationCode) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.IntegrityMethod.Validate(visited, path...)...) + + if o.Algorithm.ID == "" { + errs = append(errs, newValidationError(append(path, "Algorithm"), fmt.Errorf("required"))) + } + errs = append(errs, o.Algorithm.Validate(visited, append(path, "Algorithm")...)...) + + // TODO: check for required + + // TODO: check for required/min/max/etc. + + return errs +} + +func (o *PositiveIntegerRange) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *PresenceType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, PresenceType_No.ID, PresenceType_NoAssertion.ID, PresenceType_Yes.ID)...) + + return errs +} + +func (o *ProfileIdentifierType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, ProfileIdentifierType_Ai.ID, ProfileIdentifierType_Build.ID, ProfileIdentifierType_Core.ID, ProfileIdentifierType_Dataset.ID, ProfileIdentifierType_ExpandedLicensing.ID, ProfileIdentifierType_Extension.ID, ProfileIdentifierType_Lite.ID, ProfileIdentifierType_Security.ID, ProfileIdentifierType_SimpleLicensing.ID, ProfileIdentifierType_Software.ID)...) + + return errs +} + +func (o *Relationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Element.Validate(visited, path...)...) + + errs = append(errs, o.Completeness.Validate(visited, append(path, "Completeness")...)...) + + // TODO: check for required + + if v, ok := o.From.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "From")...)...) + } + + if o.RelationshipType.ID == "" { + errs = append(errs, newValidationError(append(path, "RelationshipType"), fmt.Errorf("required"))) + } + errs = append(errs, o.RelationshipType.Validate(visited, append(path, "RelationshipType")...)...) + + // TODO: check for required + + for i, v := range o.Tos { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "Tos", strconv.Itoa(i))...)...) + } + } + + return errs +} + +func (o *RelationshipCompleteness) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, RelationshipCompleteness_Complete.ID, RelationshipCompleteness_Incomplete.ID, RelationshipCompleteness_NoAssertion.ID)...) + + return errs +} + +func (o *RelationshipType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, RelationshipType_Affects.ID, RelationshipType_AmendedBy.ID, RelationshipType_AncestorOf.ID, RelationshipType_AvailableFrom.ID, RelationshipType_Configures.ID, RelationshipType_Contains.ID, RelationshipType_CoordinatedBy.ID, RelationshipType_CopiedTo.ID, RelationshipType_DelegatedTo.ID, RelationshipType_DependsOn.ID, RelationshipType_DescendantOf.ID, RelationshipType_Describes.ID, RelationshipType_DoesNotAffect.ID, RelationshipType_ExpandsTo.ID, RelationshipType_ExploitCreatedBy.ID, RelationshipType_FixedBy.ID, RelationshipType_FixedIn.ID, RelationshipType_FoundBy.ID, RelationshipType_Generates.ID, RelationshipType_HasAddedFile.ID, RelationshipType_HasAssessmentFor.ID, RelationshipType_HasAssociatedVulnerability.ID, RelationshipType_HasConcludedLicense.ID, RelationshipType_HasDataFile.ID, RelationshipType_HasDeclaredLicense.ID, RelationshipType_HasDeletedFile.ID, RelationshipType_HasDependencyManifest.ID, RelationshipType_HasDistributionArtifact.ID, RelationshipType_HasDocumentation.ID, RelationshipType_HasDynamicLink.ID, RelationshipType_HasEvidence.ID, RelationshipType_HasExample.ID, RelationshipType_HasHost.ID, RelationshipType_HasInput.ID, RelationshipType_HasMetadata.ID, RelationshipType_HasOptionalComponent.ID, RelationshipType_HasOptionalDependency.ID, RelationshipType_HasOutput.ID, RelationshipType_HasPrerequisite.ID, RelationshipType_HasProvidedDependency.ID, RelationshipType_HasRequirement.ID, RelationshipType_HasSpecification.ID, RelationshipType_HasStaticLink.ID, RelationshipType_HasTest.ID, RelationshipType_HasTestCase.ID, RelationshipType_HasVariant.ID, RelationshipType_InvokedBy.ID, RelationshipType_ModifiedBy.ID, RelationshipType_Other.ID, RelationshipType_PackagedBy.ID, RelationshipType_PatchedBy.ID, RelationshipType_PublishedBy.ID, RelationshipType_ReportedBy.ID, RelationshipType_RepublishedBy.ID, RelationshipType_SerializedInArtifact.ID, RelationshipType_TestedOn.ID, RelationshipType_TrainedOn.ID, RelationshipType_UnderInvestigationFor.ID, RelationshipType_UsesTool.ID)...) + + return errs +} + +func (o *SpdxDocument) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.ElementCollection.Validate(visited, path...)...) + + if v, ok := o.DataLicense.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "DataLicense")...)...) + } + + for i, v := range o.Imports { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "Imports", strconv.Itoa(i))...)...) + } + } + + for i, v := range o.NamespaceMaps { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "NamespaceMaps", strconv.Itoa(i))...)...) + } + } + + return errs +} + +func (o *SupportType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, SupportType_Deployed.ID, SupportType_Development.ID, SupportType_EndOfSupport.ID, SupportType_LimitedSupport.ID, SupportType_NoAssertion.ID, SupportType_NoSupport.ID, SupportType_Support.ID)...) + + return errs +} + +func (o *Tool) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Element.Validate(visited, path...)...) + + return errs +} + +func (o *DatasetConfidentialityLevelType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, DatasetConfidentialityLevelType_Amber.ID, DatasetConfidentialityLevelType_Clear.ID, DatasetConfidentialityLevelType_Green.ID, DatasetConfidentialityLevelType_Red.ID)...) + + return errs +} + +func (o *DatasetDatasetAvailabilityType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, DatasetDatasetAvailabilityType_Clickthrough.ID, DatasetDatasetAvailabilityType_DirectDownload.ID, DatasetDatasetAvailabilityType_Query.ID, DatasetDatasetAvailabilityType_Registration.ID, DatasetDatasetAvailabilityType_ScrapingScript.ID)...) + + return errs +} + +func (o *DatasetDatasetType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, DatasetDatasetType_Audio.ID, DatasetDatasetType_Categorical.ID, DatasetDatasetType_Graph.ID, DatasetDatasetType_Image.ID, DatasetDatasetType_NoAssertion.ID, DatasetDatasetType_Numeric.ID, DatasetDatasetType_Other.ID, DatasetDatasetType_Sensor.ID, DatasetDatasetType_Structured.ID, DatasetDatasetType_Syntactic.ID, DatasetDatasetType_Text.ID, DatasetDatasetType_Timeseries.ID, DatasetDatasetType_Timestamp.ID, DatasetDatasetType_Video.ID)...) + + return errs +} + +func (o *ExpandedlicensingLicenseAddition) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Element.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required/min/max/etc. + + // TODO: check for required + return errs +} + +func (o *ExpandedlicensingListedLicenseException) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.ExpandedlicensingLicenseAddition.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *ExtensionCdxPropertyEntry) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *ExtensionExtension) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + return errs +} + +func (o *SecurityCvssSeverityType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, SecurityCvssSeverityType_Critical.ID, SecurityCvssSeverityType_High.ID, SecurityCvssSeverityType_Low.ID, SecurityCvssSeverityType_Medium.ID, SecurityCvssSeverityType_None.ID)...) + + return errs +} + +func (o *SecurityExploitCatalogType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, SecurityExploitCatalogType_Kev.ID, SecurityExploitCatalogType_Other.ID)...) + + return errs +} + +func (o *SecuritySsvcDecisionType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, SecuritySsvcDecisionType_Act.ID, SecuritySsvcDecisionType_Attend.ID, SecuritySsvcDecisionType_Track.ID, SecuritySsvcDecisionType_TrackStar.ID)...) + + return errs +} + +func (o *SecurityVexJustificationType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, SecurityVexJustificationType_ComponentNotPresent.ID, SecurityVexJustificationType_InlineMitigationsAlreadyExist.ID, SecurityVexJustificationType_VulnerableCodeCannotBeControlledByAdversary.ID, SecurityVexJustificationType_VulnerableCodeNotInExecutePath.ID, SecurityVexJustificationType_VulnerableCodeNotPresent.ID)...) + + return errs +} + +func (o *SecurityVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Relationship.Validate(visited, path...)...) + + if v, ok := o.SuppliedBy.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "SuppliedBy")...)...) + } + + if v, ok := o.SecurityAssessedElement.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "SecurityAssessedElement")...)...) + } + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *SimplelicensingAnyLicenseInfo) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Element.Validate(visited, path...)...) + + return errs +} + +func (o *SimplelicensingLicenseExpression) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) + + for i, v := range o.SimplelicensingCustomIdToUris { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "SimplelicensingCustomIdToUris", strconv.Itoa(i))...)...) + } + } + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *SimplelicensingSimpleLicensingText) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Element.Validate(visited, path...)...) + + // TODO: check for required + return errs +} + +func (o *SoftwareContentIdentifier) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.IntegrityMethod.Validate(visited, path...)...) + + if o.SoftwareContentIdentifierType.ID == "" { + errs = append(errs, newValidationError(append(path, "SoftwareContentIdentifierType"), fmt.Errorf("required"))) + } + errs = append(errs, o.SoftwareContentIdentifierType.Validate(visited, append(path, "SoftwareContentIdentifierType")...)...) + + // TODO: check for required + return errs +} + +func (o *SoftwareContentIdentifierType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, SoftwareContentIdentifierType_Gitoid.ID, SoftwareContentIdentifierType_Swhid.ID)...) + + return errs +} + +func (o *SoftwareFileKindType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, SoftwareFileKindType_Directory.ID, SoftwareFileKindType_File.ID)...) + + return errs +} + +func (o *SoftwareSbomType) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, SoftwareSbomType_Analyzed.ID, SoftwareSbomType_Build.ID, SoftwareSbomType_Deployed.ID, SoftwareSbomType_Design.ID, SoftwareSbomType_Runtime.ID, SoftwareSbomType_Source.ID)...) + + return errs +} + +func (o *SoftwareSoftwarePurpose) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + + errs = append(errs, validateInValues(path, o.ID, SoftwareSoftwarePurpose_Application.ID, SoftwareSoftwarePurpose_Archive.ID, SoftwareSoftwarePurpose_Bom.ID, SoftwareSoftwarePurpose_Configuration.ID, SoftwareSoftwarePurpose_Container.ID, SoftwareSoftwarePurpose_Data.ID, SoftwareSoftwarePurpose_Device.ID, SoftwareSoftwarePurpose_DeviceDriver.ID, SoftwareSoftwarePurpose_DiskImage.ID, SoftwareSoftwarePurpose_Documentation.ID, SoftwareSoftwarePurpose_Evidence.ID, SoftwareSoftwarePurpose_Executable.ID, SoftwareSoftwarePurpose_File.ID, SoftwareSoftwarePurpose_FilesystemImage.ID, SoftwareSoftwarePurpose_Firmware.ID, SoftwareSoftwarePurpose_Framework.ID, SoftwareSoftwarePurpose_Install.ID, SoftwareSoftwarePurpose_Library.ID, SoftwareSoftwarePurpose_Manifest.ID, SoftwareSoftwarePurpose_Model.ID, SoftwareSoftwarePurpose_Module.ID, SoftwareSoftwarePurpose_OperatingSystem.ID, SoftwareSoftwarePurpose_Other.ID, SoftwareSoftwarePurpose_Patch.ID, SoftwareSoftwarePurpose_Platform.ID, SoftwareSoftwarePurpose_Requirement.ID, SoftwareSoftwarePurpose_Source.ID, SoftwareSoftwarePurpose_Specification.ID, SoftwareSoftwarePurpose_Test.ID)...) + + return errs +} + +func (o *BuildBuild) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Element.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + + for i, v := range o.BuildConfigSourceDigests { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "BuildConfigSourceDigests", strconv.Itoa(i))...)...) + } + } + + // TODO: check for required/min/max/etc. + + // TODO: check for required/min/max/etc. + + for i, v := range o.BuildEnvironments { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "BuildEnvironments", strconv.Itoa(i))...)...) + } + } + + for i, v := range o.BuildParameters { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "BuildParameters", strconv.Itoa(i))...)...) + } + } + + return errs +} + +func (o *Agent) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Element.Validate(visited, path...)...) + + return errs +} + +func (o *Annotation) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Element.Validate(visited, path...)...) + + if o.AnnotationType.ID == "" { + errs = append(errs, newValidationError(append(path, "AnnotationType"), fmt.Errorf("required"))) + } + errs = append(errs, o.AnnotationType.Validate(visited, append(path, "AnnotationType")...)...) + + // TODO: check for required + + // TODO: check for required + + if v, ok := o.Subject.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "Subject")...)...) + } + + return errs +} + +func (o *Artifact) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Element.Validate(visited, path...)...) + + // TODO: check for required + + for i, v := range o.OriginatedBys { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "OriginatedBys", strconv.Itoa(i))...)...) + } + } + + // TODO: check for required + + // TODO: check for required/min/max/etc. + + if v, ok := o.SuppliedBy.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "SuppliedBy")...)...) + } + + for _, v := range o.SupportLevels { + errs = append(errs, v.Validate(visited, append(path, "SupportLevels")...)...) + } + + // TODO: check for required + return errs +} + +func (o *Bundle) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.ElementCollection.Validate(visited, path...)...) + + // TODO: check for required + return errs +} + +func (o *Hash) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.IntegrityMethod.Validate(visited, path...)...) + + if o.Algorithm.ID == "" { + errs = append(errs, newValidationError(append(path, "Algorithm"), fmt.Errorf("required"))) + } + errs = append(errs, o.Algorithm.Validate(visited, append(path, "Algorithm")...)...) + + // TODO: check for required + return errs +} + +func (o *LifecycleScopedRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Relationship.Validate(visited, path...)...) + + errs = append(errs, o.Scope.Validate(visited, append(path, "Scope")...)...) + + return errs +} + +func (o *Organization) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Agent.Validate(visited, path...)...) + + return errs +} + +func (o *Person) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Agent.Validate(visited, path...)...) + + return errs +} + +func (o *SoftwareAgent) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Agent.Validate(visited, path...)...) + + return errs +} + +func (o *ExpandedlicensingConjunctiveLicenseSet) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) + + for i, v := range o.ExpandedlicensingMembers { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "ExpandedlicensingMembers", strconv.Itoa(i))...)...) + } + } + + return errs +} + +func (o *ExpandedlicensingCustomLicenseAddition) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.ExpandedlicensingLicenseAddition.Validate(visited, path...)...) + + return errs +} + +func (o *ExpandedlicensingDisjunctiveLicenseSet) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) + + for i, v := range o.ExpandedlicensingMembers { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "ExpandedlicensingMembers", strconv.Itoa(i))...)...) + } + } + + return errs +} + +func (o *ExpandedlicensingExtendableLicense) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) + + return errs +} + +func (o *ExpandedlicensingIndividualLicensingInfo) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) + + errs = append(errs, validateInValues(path, o.ID, ExpandedlicensingIndividualLicensingInfo_NoAssertionLicense.ID, ExpandedlicensingIndividualLicensingInfo_NoneLicense.ID)...) + + return errs +} + +func (o *ExpandedlicensingLicense) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.ExpandedlicensingExtendableLicense.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required/min/max/etc. + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *ExpandedlicensingListedLicense) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.ExpandedlicensingLicense.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *ExpandedlicensingOrLaterOperator) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.ExpandedlicensingExtendableLicense.Validate(visited, path...)...) + + if v, ok := o.ExpandedlicensingSubjectLicense.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "ExpandedlicensingSubjectLicense")...)...) + } + + return errs +} + +func (o *ExpandedlicensingWithAdditionOperator) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) + + if v, ok := o.ExpandedlicensingSubjectAddition.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "ExpandedlicensingSubjectAddition")...)...) + } + + if v, ok := o.ExpandedlicensingSubjectExtendableLicense.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "ExpandedlicensingSubjectExtendableLicense")...)...) + } + + return errs +} + +func (o *ExtensionCdxPropertiesExtension) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.ExtensionExtension.Validate(visited, path...)...) + + for i, v := range o.ExtensionCdxPropertys { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "ExtensionCdxPropertys", strconv.Itoa(i))...)...) + } + } + + return errs +} + +func (o *SecurityCvssV2VulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *SecurityCvssV3VulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) + + // TODO: check for required + + if o.SecuritySeverity.ID == "" { + errs = append(errs, newValidationError(append(path, "SecuritySeverity"), fmt.Errorf("required"))) + } + errs = append(errs, o.SecuritySeverity.Validate(visited, append(path, "SecuritySeverity")...)...) + + // TODO: check for required + return errs +} + +func (o *SecurityCvssV4VulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) + + // TODO: check for required + + if o.SecuritySeverity.ID == "" { + errs = append(errs, newValidationError(append(path, "SecuritySeverity"), fmt.Errorf("required"))) + } + errs = append(errs, o.SecuritySeverity.Validate(visited, append(path, "SecuritySeverity")...)...) + + // TODO: check for required + return errs +} + +func (o *SecurityEpssVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *SecurityExploitCatalogVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) + + if o.SecurityCatalogType.ID == "" { + errs = append(errs, newValidationError(append(path, "SecurityCatalogType"), fmt.Errorf("required"))) + } + errs = append(errs, o.SecurityCatalogType.Validate(visited, append(path, "SecurityCatalogType")...)...) + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *SecuritySsvcVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) + + if o.SecurityDecisionType.ID == "" { + errs = append(errs, newValidationError(append(path, "SecurityDecisionType"), fmt.Errorf("required"))) + } + errs = append(errs, o.SecurityDecisionType.Validate(visited, append(path, "SecurityDecisionType")...)...) + + return errs +} + +func (o *SecurityVexVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *SecurityVulnerability) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Artifact.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *SoftwareSoftwareArtifact) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Artifact.Validate(visited, path...)...) + + for _, v := range o.SoftwareAdditionalPurposes { + errs = append(errs, v.Validate(visited, append(path, "SoftwareAdditionalPurposes")...)...) + } + + // TODO: check for required/min/max/etc. + + for i, v := range o.SoftwareContentIdentifiers { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "SoftwareContentIdentifiers", strconv.Itoa(i))...)...) + } + } + + // TODO: check for required + + errs = append(errs, o.SoftwarePrimaryPurpose.Validate(visited, append(path, "SoftwarePrimaryPurpose")...)...) + + return errs +} + +func (o *Bom) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Bundle.Validate(visited, path...)...) + + return errs +} + +func (o *ExpandedlicensingCustomLicense) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.ExpandedlicensingLicense.Validate(visited, path...)...) + + return errs +} + +func (o *SecurityVexAffectedVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SecurityVexVulnAssessmentRelationship.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *SecurityVexFixedVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SecurityVexVulnAssessmentRelationship.Validate(visited, path...)...) + + return errs +} + +func (o *SecurityVexNotAffectedVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SecurityVexVulnAssessmentRelationship.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + + errs = append(errs, o.SecurityJustificationType.Validate(visited, append(path, "SecurityJustificationType")...)...) + + return errs +} + +func (o *SecurityVexUnderInvestigationVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SecurityVexVulnAssessmentRelationship.Validate(visited, path...)...) + + return errs +} + +func (o *SoftwareFile) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SoftwareSoftwareArtifact.Validate(visited, path...)...) + + // TODO: check for required + + errs = append(errs, o.SoftwareFileKind.Validate(visited, append(path, "SoftwareFileKind")...)...) + + return errs +} + +func (o *SoftwarePackage) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SoftwareSoftwareArtifact.Validate(visited, path...)...) + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + return errs +} + +func (o *SoftwareSbom) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.Bom.Validate(visited, path...)...) + + for _, v := range o.SoftwareSbomTypes { + errs = append(errs, v.Validate(visited, append(path, "SoftwareSbomTypes")...)...) + } + + return errs +} + +func (o *SoftwareSnippet) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SoftwareSoftwareArtifact.Validate(visited, path...)...) + + if v, ok := o.SoftwareByteRange.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "SoftwareByteRange")...)...) + } + + if v, ok := o.SoftwareLineRange.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "SoftwareLineRange")...)...) + } + + if v, ok := o.SoftwareSnippetFromFile.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "SoftwareSnippetFromFile")...)...) + } + + return errs +} + +func (o *AiAIPackage) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SoftwarePackage.Validate(visited, path...)...) + + errs = append(errs, o.AiAutonomyType.Validate(visited, append(path, "AiAutonomyType")...)...) + + // TODO: check for required/min/max/etc. + + if v, ok := o.AiEnergyConsumption.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "AiEnergyConsumption")...)...) + } + + for i, v := range o.AiHyperparameters { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "AiHyperparameters", strconv.Itoa(i))...)...) + } + } + + // TODO: check for required + + // TODO: check for required + + // TODO: check for required + + for i, v := range o.AiMetrics { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "AiMetrics", strconv.Itoa(i))...)...) + } + } + + for i, v := range o.AiMetricDecisionThresholds { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "AiMetricDecisionThresholds", strconv.Itoa(i))...)...) + } + } + + // TODO: check for required/min/max/etc. + + // TODO: check for required/min/max/etc. + + errs = append(errs, o.AiSafetyRiskAssessment.Validate(visited, append(path, "AiSafetyRiskAssessment")...)...) + + // TODO: check for required/min/max/etc. + + // TODO: check for required/min/max/etc. + + errs = append(errs, o.AiUseSensitivePersonalInformation.Validate(visited, append(path, "AiUseSensitivePersonalInformation")...)...) + + return errs +} + +func (o *DatasetDatasetPackage) Validate(visited map[any]struct{}, path ...string) []ValidationError { + if visited == nil { + visited = map[any]struct{}{} + } + if _, ok := visited[o]; ok { + return nil + } + visited[o] = struct{}{} + var errs []ValidationError + errs = append(errs, o.SoftwarePackage.Validate(visited, path...)...) + + // TODO: check for required/min/max/etc. + + errs = append(errs, o.DatasetConfidentialityLevel.Validate(visited, append(path, "DatasetConfidentialityLevel")...)...) + + // TODO: check for required + + // TODO: check for required/min/max/etc. + + errs = append(errs, o.DatasetDatasetAvailability.Validate(visited, append(path, "DatasetDatasetAvailability")...)...) + + // TODO: check for required + + // TODO: check for required + + if len(o.DatasetDatasetTypes) < 1 { + errs = append(errs, newValidationError(append(path, "DatasetDatasetTypes"), fmt.Errorf("required min count: %v", 1))) + } + for _, v := range o.DatasetDatasetTypes { + errs = append(errs, v.Validate(visited, append(path, "DatasetDatasetTypes")...)...) + } + + // TODO: check for required + + errs = append(errs, o.DatasetHasSensitivePersonalInformation.Validate(visited, append(path, "DatasetHasSensitivePersonalInformation")...)...) + + // TODO: check for required + + // TODO: check for required/min/max/etc. + + for i, v := range o.DatasetSensors { + if v, ok := v.(validator); ok { + errs = append(errs, v.Validate(visited, append(path, "DatasetSensors", strconv.Itoa(i))...)...) + } + } + + return errs +} From a45af1e6413651c7b812ca3b59997b0042fdff0a Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Tue, 28 Jan 2025 20:21:12 -0500 Subject: [PATCH 5/8] chore: update go version to 1.23 Signed-off-by: Keith Zantow --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b3e99f9..3df44ddb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version: '1.23' - name: Run tests run: make test - name: Send coverage report to coveralls From 8533d401f73c71bf383bcc336c732015a80c62d5 Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Tue, 4 Feb 2025 13:44:14 -0500 Subject: [PATCH 6/8] chore: update model and examples Signed-off-by: Keith Zantow --- spdx/v3/v3_0/model.go | 1335 ++++++++++++++----------------------- spdx/v3/v3_0/spdx.go | 69 +- spdx/v3/v3_0/spdx_test.go | 149 +---- 3 files changed, 527 insertions(+), 1026 deletions(-) diff --git a/spdx/v3/v3_0/model.go b/spdx/v3/v3_0/model.go index 590211a2..9a9c4796 100644 --- a/spdx/v3/v3_0/model.go +++ b/spdx/v3/v3_0/model.go @@ -13,19 +13,19 @@ import ( // A class for describing the energy consumption incurred by an AI model in // different stages of its lifecycle. type AiEnergyConsumption struct { - ID string + ID string `iri:"@id"` // Specifies the amount of energy consumed when finetuning the AI model that is // being used in the AI system. - AiFinetuningEnergyConsumptions AiEnergyConsumptionDescriptionList + AiFinetuningEnergyConsumptions AiEnergyConsumptionDescriptionList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/finetuningEnergyConsumption" iri-compact:"ai_finetuningEnergyConsumption"` // Specifies the amount of energy consumed during inference time by an AI model // that is being used in the AI system. - AiInferenceEnergyConsumptions AiEnergyConsumptionDescriptionList + AiInferenceEnergyConsumptions AiEnergyConsumptionDescriptionList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/inferenceEnergyConsumption" iri-compact:"ai_inferenceEnergyConsumption"` // Specifies the amount of energy consumed when training the AI model that is // being used in the AI system. - AiTrainingEnergyConsumptions AiEnergyConsumptionDescriptionList + AiTrainingEnergyConsumptions AiEnergyConsumptionDescriptionList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/trainingEnergyConsumption" iri-compact:"ai_trainingEnergyConsumption"` } func castAiEnergyConsumption(o any) *AiEnergyConsumption { @@ -45,11 +45,6 @@ type AnyAiEnergyConsumption interface { type AiEnergyConsumptionList []AnyAiEnergyConsumption -func (o *AiEnergyConsumptionList) Append(values ...AnyAiEnergyConsumption) { - *o = append(*o, values...) -} -func (o *AiEnergyConsumptionList) Remove(value AnyAiEnergyConsumption) { remove(o, value) } - func (o *AiEnergyConsumptionList) AiEnergyConsumptionIter() iter.Seq2[AnyAiEnergyConsumption, *AiEnergyConsumption] { return typeIter(*o, castAiEnergyConsumption) } @@ -57,12 +52,12 @@ func (o *AiEnergyConsumptionList) AiEnergyConsumptionIter() iter.Seq2[AnyAiEnerg // The class that helps note down the quantity of energy consumption and the unit // used for measurement. type AiEnergyConsumptionDescription struct { - ID string + ID string `iri:"@id"` // Represents the energy quantity. - AiEnergyQuantity float64 + AiEnergyQuantity float64 `iri:"https://spdx.org/rdf/3.0.1/terms/AI/energyQuantity" iri-compact:"ai_energyQuantity"` // Specifies the unit in which energy is measured. - AiEnergyUnit AiEnergyUnitType + AiEnergyUnit aiEnergyUnitType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/energyUnit" iri-compact:"ai_energyUnit"` } func castAiEnergyConsumptionDescription(o any) *AiEnergyConsumptionDescription { @@ -82,77 +77,70 @@ type AnyAiEnergyConsumptionDescription interface { type AiEnergyConsumptionDescriptionList []AnyAiEnergyConsumptionDescription -func (o *AiEnergyConsumptionDescriptionList) Append(values ...AnyAiEnergyConsumptionDescription) { - *o = append(*o, values...) -} -func (o *AiEnergyConsumptionDescriptionList) Remove(value AnyAiEnergyConsumptionDescription) { - remove(o, value) -} - func (o *AiEnergyConsumptionDescriptionList) AiEnergyConsumptionDescriptionIter() iter.Seq2[AnyAiEnergyConsumptionDescription, *AiEnergyConsumptionDescription] { return typeIter(*o, castAiEnergyConsumptionDescription) } // Specifies the unit of energy consumption. -type AiEnergyUnitType struct { - ID string +type aiEnergyUnitType struct { + ID string `iri:"@id"` } // Kilowatt-hour. -var AiEnergyUnitType_KilowattHour = AiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/kilowattHour"} +var AiEnergyUnitType_KilowattHour = aiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/kilowattHour"} // Megajoule. -var AiEnergyUnitType_Megajoule = AiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/megajoule"} +var AiEnergyUnitType_Megajoule = aiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/megajoule"} // Any other units of energy measurement. -var AiEnergyUnitType_Other = AiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/other"} +var AiEnergyUnitType_Other = aiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/other"} // Specifies the safety risk level. -type AiSafetyRiskAssessmentType struct { - ID string +type aiSafetyRiskAssessmentType struct { + ID string `iri:"@id"` } // The second-highest level of risk posed by an AI system. -var AiSafetyRiskAssessmentType_High = AiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/high"} +var AiSafetyRiskAssessmentType_High = aiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/high"} // Low/no risk is posed by an AI system. -var AiSafetyRiskAssessmentType_Low = AiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/low"} +var AiSafetyRiskAssessmentType_Low = aiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/low"} // The third-highest level of risk posed by an AI system. -var AiSafetyRiskAssessmentType_Medium = AiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/medium"} +var AiSafetyRiskAssessmentType_Medium = aiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/medium"} // The highest level of risk posed by an AI system. -var AiSafetyRiskAssessmentType_Serious = AiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/serious"} +var AiSafetyRiskAssessmentType_Serious = aiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/serious"} // Specifies the type of an annotation. -type AnnotationType struct { - ID string +type annotationType struct { + ID string `iri:"@id"` } // Used to store extra information about an Element which is not part of a review (e.g. extra information provided during the creation of the Element). -var AnnotationType_Other = AnnotationType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType/other"} +var AnnotationType_Other = annotationType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType/other"} // Used when someone reviews the Element. -var AnnotationType_Review = AnnotationType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType/review"} +var AnnotationType_Review = annotationType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType/review"} // Provides information about the creation of the Element. type CreationInfo struct { - ID string + ID string `iri:"@id"` // Provide consumers with comments by the creator of the Element about the // Element. - Comment string + Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" iri-compact:"comment"` // Identifies when the Element was originally created. - Created time.Time + Created time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/created" iri-compact:"created"` // Identifies who or what created the Element. - CreatedBys AgentList + CreatedBys AgentList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/createdBy" iri-compact:"createdBy"` // Identifies the tooling that was used during the creation of the Element. - CreatedUsings ToolList + CreatedUsings ToolList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/createdUsing" iri-compact:"createdUsing"` // Provides a reference number that can be used to understand how to parse and // interpret an Element. - SpecVersion string + SpecVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/specVersion" iri-compact:"specVersion"` } func castCreationInfo(o any) *CreationInfo { @@ -172,21 +160,18 @@ type AnyCreationInfo interface { type CreationInfoList []AnyCreationInfo -func (o *CreationInfoList) Append(values ...AnyCreationInfo) { *o = append(*o, values...) } -func (o *CreationInfoList) Remove(value AnyCreationInfo) { remove(o, value) } - func (o *CreationInfoList) CreationInfoIter() iter.Seq2[AnyCreationInfo, *CreationInfo] { return typeIter(*o, castCreationInfo) } // A key with an associated value. type DictionaryEntry struct { - ID string + ID string `iri:"@id"` // A key used in a generic key-value pair. - Key string + Key string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/key" iri-compact:"key"` // A value used in a generic key-value pair. - Value string + Value string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/value" iri-compact:"value"` } func castDictionaryEntry(o any) *DictionaryEntry { @@ -206,43 +191,40 @@ type AnyDictionaryEntry interface { type DictionaryEntryList []AnyDictionaryEntry -func (o *DictionaryEntryList) Append(values ...AnyDictionaryEntry) { *o = append(*o, values...) } -func (o *DictionaryEntryList) Remove(value AnyDictionaryEntry) { remove(o, value) } - func (o *DictionaryEntryList) DictionaryEntryIter() iter.Seq2[AnyDictionaryEntry, *DictionaryEntry] { return typeIter(*o, castDictionaryEntry) } // Base domain class from which all other SPDX-3.0 domain classes derive. type Element struct { - ID string + ID string `iri:"@id" iri-compact:"spdxId"` // Provide consumers with comments by the creator of the Element about the // Element. - Comment string + Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" iri-compact:"comment"` // Provides information about the creation of the Element. - CreationInfo AnyCreationInfo + CreationInfo AnyCreationInfo `iri:"https://spdx.org/rdf/3.0.1/terms/Core/creationInfo" iri-compact:"creationInfo"` // Provides a detailed description of the Element. - Description string + Description string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/description" iri-compact:"description"` // Specifies an Extension characterization of some aspect of an Element. - Extensions ExtensionExtensionList + Extensions ExtensionExtensionList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/extension" iri-compact:"extension"` // Provides a reference to a resource outside the scope of SPDX-3.0 content // that uniquely identifies an Element. - ExternalIdentifiers ExternalIdentifierList + ExternalIdentifiers ExternalIdentifierList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` // Points to a resource outside the scope of the SPDX-3.0 content // that provides additional characteristics of an Element. - ExternalRefs ExternalRefList + ExternalRefs ExternalRefList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalRef" iri-compact:"externalRef"` // Identifies the name of an Element as designated by the creator. - Name string + Name string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/name" iri-compact:"name"` // A short description of an Element. - Summary string + Summary string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/summary" iri-compact:"summary"` // Provides an IntegrityMethod with which the integrity of an Element can be // asserted. - VerifiedUsings IntegrityMethodList + VerifiedUsings IntegrityMethodList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` } func castElement(o any) *Element { @@ -262,9 +244,6 @@ type AnyElement interface { type ElementList []AnyElement -func (o *ElementList) Append(values ...AnyElement) { *o = append(*o, values...) } -func (o *ElementList) Remove(value AnyElement) { remove(o, value) } - func (o *ElementList) ElementIter() iter.Seq2[AnyElement, *Element] { return typeIter(*o, castElement) } func (o *ElementList) ElementCollectionIter() iter.Seq2[AnyElement, *ElementCollection] { return typeIter(*o, castElementCollection) @@ -412,13 +391,13 @@ type ElementCollection struct { Element // Refers to one or more Elements that are part of an ElementCollection. - Elements ElementList + Elements ElementList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/element" iri-compact:"element"` // Describes one a profile which the creator of this ElementCollection intends to // conform to. - ProfileConformances []ProfileIdentifierType + ProfileConformances []profileIdentifierType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/profileConformance" iri-compact:"profileConformance"` // This property is used to denote the root Element(s) of a tree of elements contained in a BOM. - RootElements ElementList + RootElements ElementList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/rootElement" iri-compact:"rootElement"` } func castElementCollection(o any) *ElementCollection { @@ -439,9 +418,6 @@ type AnyElementCollection interface { type ElementCollectionList []AnyElementCollection -func (o *ElementCollectionList) Append(values ...AnyElementCollection) { *o = append(*o, values...) } -func (o *ElementCollectionList) Remove(value AnyElementCollection) { remove(o, value) } - func (o *ElementCollectionList) ElementCollectionIter() iter.Seq2[AnyElementCollection, *ElementCollection] { return typeIter(*o, castElementCollection) } @@ -460,19 +436,19 @@ func (o *ElementCollectionList) SoftwareSbomIter() iter.Seq2[AnyElementCollectio // A reference to a resource identifier defined outside the scope of SPDX-3.0 content that uniquely identifies an Element. type ExternalIdentifier struct { - ID string + ID string `iri:"@id"` // Provide consumers with comments by the creator of the Element about the // Element. - Comment string + Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" iri-compact:"comment"` // Specifies the type of the external identifier. - ExternalIdentifierType ExternalIdentifierType + ExternalIdentifierType externalIdentifierType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalIdentifierType" iri-compact:"externalIdentifierType"` // Uniquely identifies an external element. - Identifier string + Identifier string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/identifier" iri-compact:"identifier"` // Provides the location for more information regarding an external identifier. - IdentifierLocators []string + IdentifierLocators []string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/identifierLocator" iri-compact:"identifierLocator"` // An entity that is authorized to issue identification credentials. - IssuingAuthority string + IssuingAuthority string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/issuingAuthority" iri-compact:"issuingAuthority"` } func castExternalIdentifier(o any) *ExternalIdentifier { @@ -492,68 +468,65 @@ type AnyExternalIdentifier interface { type ExternalIdentifierList []AnyExternalIdentifier -func (o *ExternalIdentifierList) Append(values ...AnyExternalIdentifier) { *o = append(*o, values...) } -func (o *ExternalIdentifierList) Remove(value AnyExternalIdentifier) { remove(o, value) } - func (o *ExternalIdentifierList) ExternalIdentifierIter() iter.Seq2[AnyExternalIdentifier, *ExternalIdentifier] { return typeIter(*o, castExternalIdentifier) } // Specifies the type of an external identifier. -type ExternalIdentifierType struct { - ID string +type externalIdentifierType struct { + ID string `iri:"@id"` } // [Common Platform Enumeration Specification 2.2](https://cpe.mitre.org/files/cpe-specification_2.2.pdf) -var ExternalIdentifierType_Cpe22 = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cpe22"} +var ExternalIdentifierType_Cpe22 = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cpe22"} // [Common Platform Enumeration: Naming Specification Version 2.3](https://csrc.nist.gov/publications/detail/nistir/7695/final) -var ExternalIdentifierType_Cpe23 = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cpe23"} +var ExternalIdentifierType_Cpe23 = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cpe23"} // Common Vulnerabilities and Exposures identifiers, an identifier for a specific software flaw defined within the official CVE Dictionary and that conforms to the [CVE specification](https://csrc.nist.gov/glossary/term/cve_id). -var ExternalIdentifierType_Cve = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cve"} +var ExternalIdentifierType_Cve = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cve"} // Email address, as defined in [RFC 3696](https://datatracker.ietf.org/doc/rfc3986/) Section 3. -var ExternalIdentifierType_Email = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/email"} +var ExternalIdentifierType_Email = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/email"} // [Gitoid](https://www.iana.org/assignments/uri-schemes/prov/gitoid), stands for [Git Object ID](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). A gitoid of type blob is a unique hash of a binary artifact. A gitoid may represent either an [Artifact Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-identifier-types) for the software artifact or an [Input Manifest Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#input-manifest-identifier) for the software artifact's associated [Artifact Input Manifest](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-input-manifest); this ambiguity exists because the Artifact Input Manifest is itself an artifact, and the gitoid of that artifact is its valid identifier. Gitoids calculated on software artifacts (Snippet, File, or Package Elements) should be recorded in the SPDX 3.0 SoftwareArtifact's contentIdentifier property. Gitoids calculated on the Artifact Input Manifest (Input Manifest Identifier) should be recorded in the SPDX 3.0 Element's externalIdentifier property. See [OmniBOR Specification](https://github.com/omnibor/spec/), a minimalistic specification for describing software [Artifact Dependency Graphs](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-dependency-graph-adg). -var ExternalIdentifierType_Gitoid = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/gitoid"} +var ExternalIdentifierType_Gitoid = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/gitoid"} // Used when the type does not match any of the other options. -var ExternalIdentifierType_Other = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/other"} +var ExternalIdentifierType_Other = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/other"} // Package URL, as defined in the corresponding [Annex](../../../annexes/pkg-url-specification.md) of this specification. -var ExternalIdentifierType_PackageUrl = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/packageUrl"} +var ExternalIdentifierType_PackageUrl = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/packageUrl"} // Used when there is a security related identifier of unspecified type. -var ExternalIdentifierType_SecurityOther = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/securityOther"} +var ExternalIdentifierType_SecurityOther = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/securityOther"} // SoftWare Hash IDentifier, a persistent intrinsic identifier for digital artifacts, such as files, trees (also known as directories or folders), commits, and other objects typically found in version control systems. The format of the identifiers is defined in the [SWHID specification](https://www.swhid.org/specification/v1.1/4.Syntax) (ISO/IEC DIS 18670). They typically look like `swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2`. -var ExternalIdentifierType_Swhid = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/swhid"} +var ExternalIdentifierType_Swhid = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/swhid"} // Concise Software Identification (CoSWID) tag, as defined in [RFC 9393](https://datatracker.ietf.org/doc/rfc9393/) Section 2.3. -var ExternalIdentifierType_Swid = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/swid"} +var ExternalIdentifierType_Swid = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/swid"} // [Uniform Resource Identifier (URI) Schemes](https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml). The scheme used in order to locate a resource. -var ExternalIdentifierType_UrlScheme = ExternalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/urlScheme"} +var ExternalIdentifierType_UrlScheme = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/urlScheme"} // A map of Element identifiers that are used within an SpdxDocument but defined // external to that SpdxDocument. type ExternalMap struct { - ID string + ID string `iri:"@id"` // Artifact representing a serialization instance of SPDX data containing the // definition of a particular Element. - DefiningArtifact AnyArtifact + DefiningArtifact AnyArtifact `iri:"https://spdx.org/rdf/3.0.1/terms/Core/definingArtifact" iri-compact:"definingArtifact"` // Identifies an external Element used within an SpdxDocument but defined // external to that SpdxDocument. - ExternalSpdxId string + ExternalSpdxId string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalSpdxId" iri-compact:"externalSpdxId"` // Provides an indication of where to retrieve an external Element. - LocationHint string + LocationHint string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/locationHint" iri-compact:"locationHint"` // Provides an IntegrityMethod with which the integrity of an Element can be // asserted. - VerifiedUsings IntegrityMethodList + VerifiedUsings IntegrityMethodList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` } func castExternalMap(o any) *ExternalMap { @@ -573,26 +546,23 @@ type AnyExternalMap interface { type ExternalMapList []AnyExternalMap -func (o *ExternalMapList) Append(values ...AnyExternalMap) { *o = append(*o, values...) } -func (o *ExternalMapList) Remove(value AnyExternalMap) { remove(o, value) } - func (o *ExternalMapList) ExternalMapIter() iter.Seq2[AnyExternalMap, *ExternalMap] { return typeIter(*o, castExternalMap) } // A reference to a resource outside the scope of SPDX-3.0 content related to an Element. type ExternalRef struct { - ID string + ID string `iri:"@id"` // Provide consumers with comments by the creator of the Element about the // Element. - Comment string + Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" iri-compact:"comment"` // Provides information about the content type of an Element or a Property. - ContentType string + ContentType string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/contentType" iri-compact:"contentType"` // Specifies the type of the external reference. - ExternalRefType ExternalRefType + ExternalRefType externalRefType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalRefType" iri-compact:"externalRefType"` // Provides the location of an external reference. - Locators []string + Locators []string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/locator" iri-compact:"locator"` } func castExternalRef(o any) *ExternalRef { @@ -612,226 +582,223 @@ type AnyExternalRef interface { type ExternalRefList []AnyExternalRef -func (o *ExternalRefList) Append(values ...AnyExternalRef) { *o = append(*o, values...) } -func (o *ExternalRefList) Remove(value AnyExternalRef) { remove(o, value) } - func (o *ExternalRefList) ExternalRefIter() iter.Seq2[AnyExternalRef, *ExternalRef] { return typeIter(*o, castExternalRef) } // Specifies the type of an external reference. -type ExternalRefType struct { - ID string +type externalRefType struct { + ID string `iri:"@id"` } // A reference to an alternative download location. -var ExternalRefType_AltDownloadLocation = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/altDownloadLocation"} +var ExternalRefType_AltDownloadLocation = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/altDownloadLocation"} // A reference to an alternative web page. -var ExternalRefType_AltWebPage = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/altWebPage"} +var ExternalRefType_AltWebPage = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/altWebPage"} // A reference to binary artifacts related to a package. -var ExternalRefType_BinaryArtifact = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/binaryArtifact"} +var ExternalRefType_BinaryArtifact = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/binaryArtifact"} // A reference to a Bower package. The package locator format, looks like `package#version`, is defined in the "install" section of [Bower API documentation](https://bower.io/docs/api/#install). -var ExternalRefType_Bower = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/bower"} +var ExternalRefType_Bower = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/bower"} // A reference build metadata related to a published package. -var ExternalRefType_BuildMeta = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/buildMeta"} +var ExternalRefType_BuildMeta = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/buildMeta"} // A reference build system used to create or publish the package. -var ExternalRefType_BuildSystem = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/buildSystem"} +var ExternalRefType_BuildSystem = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/buildSystem"} // A reference to a certification report for a package from an accredited/independent body. -var ExternalRefType_CertificationReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/certificationReport"} +var ExternalRefType_CertificationReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/certificationReport"} // A reference to the instant messaging system used by the maintainer for a package. -var ExternalRefType_Chat = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/chat"} +var ExternalRefType_Chat = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/chat"} // A reference to a Software Composition Analysis (SCA) report. -var ExternalRefType_ComponentAnalysisReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/componentAnalysisReport"} +var ExternalRefType_ComponentAnalysisReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/componentAnalysisReport"} // [Common Weakness Enumeration](https://csrc.nist.gov/glossary/term/common_weakness_enumeration). A reference to a source of software flaw defined within the official [CWE List](https://cwe.mitre.org/data/) that conforms to the [CWE specification](https://cwe.mitre.org/). -var ExternalRefType_Cwe = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/cwe"} +var ExternalRefType_Cwe = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/cwe"} // A reference to the documentation for a package. -var ExternalRefType_Documentation = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/documentation"} +var ExternalRefType_Documentation = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/documentation"} // A reference to a dynamic analysis report for a package. -var ExternalRefType_DynamicAnalysisReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/dynamicAnalysisReport"} +var ExternalRefType_DynamicAnalysisReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/dynamicAnalysisReport"} // A reference to the End Of Sale (EOS) and/or End Of Life (EOL) information related to a package. -var ExternalRefType_EolNotice = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/eolNotice"} +var ExternalRefType_EolNotice = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/eolNotice"} // A reference to a export control assessment for a package. -var ExternalRefType_ExportControlAssessment = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/exportControlAssessment"} +var ExternalRefType_ExportControlAssessment = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/exportControlAssessment"} // A reference to funding information related to a package. -var ExternalRefType_Funding = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/funding"} +var ExternalRefType_Funding = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/funding"} // A reference to the issue tracker for a package. -var ExternalRefType_IssueTracker = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/issueTracker"} +var ExternalRefType_IssueTracker = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/issueTracker"} // A reference to additional license information related to an artifact. -var ExternalRefType_License = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/license"} +var ExternalRefType_License = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/license"} // A reference to the mailing list used by the maintainer for a package. -var ExternalRefType_MailingList = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/mailingList"} +var ExternalRefType_MailingList = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/mailingList"} // A reference to a Maven repository artifact. The artifact locator format is defined in the [Maven documentation](https://maven.apache.org/guides/mini/guide-naming-conventions.html) and looks like `groupId:artifactId[:version]`. -var ExternalRefType_MavenCentral = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/mavenCentral"} +var ExternalRefType_MavenCentral = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/mavenCentral"} // A reference to metrics related to package such as OpenSSF scorecards. -var ExternalRefType_Metrics = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/metrics"} +var ExternalRefType_Metrics = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/metrics"} // A reference to an npm package. The package locator format is defined in the [npm documentation](https://docs.npmjs.com/cli/v10/configuring-npm/package-json) and looks like `package@version`. -var ExternalRefType_Npm = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/npm"} +var ExternalRefType_Npm = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/npm"} // A reference to a NuGet package. The package locator format is defined in the [NuGet documentation](https://docs.nuget.org) and looks like `package/version`. -var ExternalRefType_Nuget = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/nuget"} +var ExternalRefType_Nuget = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/nuget"} // Used when the type does not match any of the other options. -var ExternalRefType_Other = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/other"} +var ExternalRefType_Other = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/other"} // A reference to a privacy assessment for a package. -var ExternalRefType_PrivacyAssessment = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/privacyAssessment"} +var ExternalRefType_PrivacyAssessment = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/privacyAssessment"} // A reference to additional product metadata such as reference within organization's product catalog. -var ExternalRefType_ProductMetadata = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/productMetadata"} +var ExternalRefType_ProductMetadata = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/productMetadata"} // A reference to a purchase order for a package. -var ExternalRefType_PurchaseOrder = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/purchaseOrder"} +var ExternalRefType_PurchaseOrder = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/purchaseOrder"} // A reference to a quality assessment for a package. -var ExternalRefType_QualityAssessmentReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/qualityAssessmentReport"} +var ExternalRefType_QualityAssessmentReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/qualityAssessmentReport"} // A reference to a published list of releases for a package. -var ExternalRefType_ReleaseHistory = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/releaseHistory"} +var ExternalRefType_ReleaseHistory = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/releaseHistory"} // A reference to the release notes for a package. -var ExternalRefType_ReleaseNotes = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/releaseNotes"} +var ExternalRefType_ReleaseNotes = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/releaseNotes"} // A reference to a risk assessment for a package. -var ExternalRefType_RiskAssessment = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/riskAssessment"} +var ExternalRefType_RiskAssessment = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/riskAssessment"} // A reference to a runtime analysis report for a package. -var ExternalRefType_RuntimeAnalysisReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/runtimeAnalysisReport"} +var ExternalRefType_RuntimeAnalysisReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/runtimeAnalysisReport"} // A reference to information assuring that the software is developed using security practices as defined by [NIST SP 800-218 Secure Software Development Framework (SSDF) Version 1.1](https://csrc.nist.gov/pubs/sp/800/218/final) or [CISA Secure Software Development Attestation Form](https://www.cisa.gov/resources-tools/resources/secure-software-development-attestation-form). -var ExternalRefType_SecureSoftwareAttestation = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/secureSoftwareAttestation"} +var ExternalRefType_SecureSoftwareAttestation = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/secureSoftwareAttestation"} // A reference to the security adversary model for a package. -var ExternalRefType_SecurityAdversaryModel = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityAdversaryModel"} +var ExternalRefType_SecurityAdversaryModel = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityAdversaryModel"} // A reference to a published security advisory (where advisory as defined per [ISO 29147:2018](https://www.iso.org/standard/72311.html)) that may affect one or more elements, e.g., vendor advisories or specific NVD entries. -var ExternalRefType_SecurityAdvisory = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityAdvisory"} +var ExternalRefType_SecurityAdvisory = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityAdvisory"} // A reference to the patch or source code that fixes a vulnerability. -var ExternalRefType_SecurityFix = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityFix"} +var ExternalRefType_SecurityFix = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityFix"} // A reference to related security information of unspecified type. -var ExternalRefType_SecurityOther = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityOther"} +var ExternalRefType_SecurityOther = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityOther"} // A reference to a [penetration test](https://en.wikipedia.org/wiki/Penetration_test) report for a package. -var ExternalRefType_SecurityPenTestReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityPenTestReport"} +var ExternalRefType_SecurityPenTestReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityPenTestReport"} // A reference to instructions for reporting newly discovered security vulnerabilities for a package. -var ExternalRefType_SecurityPolicy = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityPolicy"} +var ExternalRefType_SecurityPolicy = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityPolicy"} // A reference the [security threat model](https://en.wikipedia.org/wiki/Threat_model) for a package. -var ExternalRefType_SecurityThreatModel = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityThreatModel"} +var ExternalRefType_SecurityThreatModel = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityThreatModel"} // A reference to a social media channel for a package. -var ExternalRefType_SocialMedia = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/socialMedia"} +var ExternalRefType_SocialMedia = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/socialMedia"} // A reference to an artifact containing the sources for a package. -var ExternalRefType_SourceArtifact = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/sourceArtifact"} +var ExternalRefType_SourceArtifact = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/sourceArtifact"} // A reference to a static analysis report for a package. -var ExternalRefType_StaticAnalysisReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/staticAnalysisReport"} +var ExternalRefType_StaticAnalysisReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/staticAnalysisReport"} // A reference to the software support channel or other support information for a package. -var ExternalRefType_Support = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/support"} +var ExternalRefType_Support = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/support"} // A reference to a version control system related to a software artifact. -var ExternalRefType_Vcs = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vcs"} +var ExternalRefType_Vcs = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vcs"} // A reference to a Vulnerability Disclosure Report (VDR) which provides the software supplier's analysis and findings describing the impact (or lack of impact) that reported vulnerabilities have on packages or products in the supplier's SBOM as defined in [NIST SP 800-161 Cybersecurity Supply Chain Risk Management Practices for Systems and Organizations](https://csrc.nist.gov/pubs/sp/800/161/r1/final). -var ExternalRefType_VulnerabilityDisclosureReport = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vulnerabilityDisclosureReport"} +var ExternalRefType_VulnerabilityDisclosureReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vulnerabilityDisclosureReport"} // A reference to a Vulnerability Exploitability eXchange (VEX) statement which provides information on whether a product is impacted by a specific vulnerability in an included package and, if affected, whether there are actions recommended to remediate. See also [NTIA VEX one-page summary](https://ntia.gov/files/ntia/publications/vex_one-page_summary.pdf). -var ExternalRefType_VulnerabilityExploitabilityAssessment = ExternalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vulnerabilityExploitabilityAssessment"} +var ExternalRefType_VulnerabilityExploitabilityAssessment = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vulnerabilityExploitabilityAssessment"} // A mathematical algorithm that maps data of arbitrary size to a bit string. -type HashAlgorithm struct { - ID string +type hashAlgorithm struct { + ID string `iri:"@id"` } // Adler-32 checksum is part of the widely used zlib compression library as defined in [RFC 1950](https://datatracker.ietf.org/doc/rfc1950/) Section 2.3. -var HashAlgorithm_Adler32 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/adler32"} +var HashAlgorithm_Adler32 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/adler32"} // BLAKE2b algorithm with a digest size of 256, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. -var HashAlgorithm_Blake2b256 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b256"} +var HashAlgorithm_Blake2b256 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b256"} // BLAKE2b algorithm with a digest size of 384, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. -var HashAlgorithm_Blake2b384 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b384"} +var HashAlgorithm_Blake2b384 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b384"} // BLAKE2b algorithm with a digest size of 512, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. -var HashAlgorithm_Blake2b512 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b512"} +var HashAlgorithm_Blake2b512 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b512"} // [BLAKE3](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf) -var HashAlgorithm_Blake3 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake3"} +var HashAlgorithm_Blake3 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake3"} // [Dilithium](https://pq-crystals.org/dilithium/) -var HashAlgorithm_CrystalsDilithium = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/crystalsDilithium"} +var HashAlgorithm_CrystalsDilithium = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/crystalsDilithium"} // [Kyber](https://pq-crystals.org/kyber/) -var HashAlgorithm_CrystalsKyber = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/crystalsKyber"} +var HashAlgorithm_CrystalsKyber = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/crystalsKyber"} // [FALCON](https://falcon-sign.info/falcon.pdf) -var HashAlgorithm_Falcon = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/falcon"} +var HashAlgorithm_Falcon = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/falcon"} // MD2 message-digest algorithm, as defined in [RFC 1319](https://datatracker.ietf.org/doc/rfc1319/). -var HashAlgorithm_Md2 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md2"} +var HashAlgorithm_Md2 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md2"} // MD4 message-digest algorithm, as defined in [RFC 1186](https://datatracker.ietf.org/doc/rfc1186/). -var HashAlgorithm_Md4 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md4"} +var HashAlgorithm_Md4 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md4"} // MD5 message-digest algorithm, as defined in [RFC 1321](https://datatracker.ietf.org/doc/rfc1321/). -var HashAlgorithm_Md5 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md5"} +var HashAlgorithm_Md5 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md5"} // [MD6 hash function](https://people.csail.mit.edu/rivest/pubs/RABCx08.pdf) -var HashAlgorithm_Md6 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md6"} +var HashAlgorithm_Md6 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md6"} // any hashing algorithm that does not exist in this list of entries -var HashAlgorithm_Other = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/other"} +var HashAlgorithm_Other = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/other"} // SHA-1, a secure hashing algorithm, as defined in [RFC 3174](https://datatracker.ietf.org/doc/rfc3174/). -var HashAlgorithm_Sha1 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha1"} +var HashAlgorithm_Sha1 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha1"} // SHA-2 with a digest length of 224, as defined in [RFC 3874](https://datatracker.ietf.org/doc/rfc3874/). -var HashAlgorithm_Sha224 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha224"} +var HashAlgorithm_Sha224 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha224"} // SHA-2 with a digest length of 256, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). -var HashAlgorithm_Sha256 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha256"} +var HashAlgorithm_Sha256 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha256"} // SHA-2 with a digest length of 384, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). -var HashAlgorithm_Sha384 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha384"} +var HashAlgorithm_Sha384 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha384"} // SHA-3 with a digest length of 224, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). -var HashAlgorithm_Sha3224 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_224"} +var HashAlgorithm_Sha3224 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_224"} // SHA-3 with a digest length of 256, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). -var HashAlgorithm_Sha3256 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_256"} +var HashAlgorithm_Sha3256 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_256"} // SHA-3 with a digest length of 384, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). -var HashAlgorithm_Sha3384 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_384"} +var HashAlgorithm_Sha3384 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_384"} // SHA-3 with a digest length of 512, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). -var HashAlgorithm_Sha3512 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_512"} +var HashAlgorithm_Sha3512 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_512"} // SHA-2 with a digest length of 512, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). -var HashAlgorithm_Sha512 = HashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha512"} +var HashAlgorithm_Sha512 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha512"} // A concrete subclass of Element used by Individuals in the // Core profile. @@ -865,20 +832,17 @@ type AnyIndividualElement interface { type IndividualElementList []AnyIndividualElement -func (o *IndividualElementList) Append(values ...AnyIndividualElement) { *o = append(*o, values...) } -func (o *IndividualElementList) Remove(value AnyIndividualElement) { remove(o, value) } - func (o *IndividualElementList) IndividualElementIter() iter.Seq2[AnyIndividualElement, *IndividualElement] { return typeIter(*o, castIndividualElement) } // Provides an independently reproducible mechanism that permits verification of a specific Element. type IntegrityMethod struct { - ID string + ID string `iri:"@id"` // Provide consumers with comments by the creator of the Element about the // Element. - Comment string + Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" iri-compact:"comment"` } func castIntegrityMethod(o any) *IntegrityMethod { @@ -898,9 +862,6 @@ type AnyIntegrityMethod interface { type IntegrityMethodList []AnyIntegrityMethod -func (o *IntegrityMethodList) Append(values ...AnyIntegrityMethod) { *o = append(*o, values...) } -func (o *IntegrityMethodList) Remove(value AnyIntegrityMethod) { remove(o, value) } - func (o *IntegrityMethodList) IntegrityMethodIter() iter.Seq2[AnyIntegrityMethod, *IntegrityMethod] { return typeIter(*o, castIntegrityMethod) } @@ -915,37 +876,37 @@ func (o *IntegrityMethodList) HashIter() iter.Seq2[AnyIntegrityMethod, *Hash] { } // Provide an enumerated set of lifecycle phases that can provide context to relationships. -type LifecycleScopeType struct { - ID string +type lifecycleScopeType struct { + ID string `iri:"@id"` } // A relationship has specific context implications during an element's build phase, during development. -var LifecycleScopeType_Build = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/build"} +var LifecycleScopeType_Build = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/build"} // A relationship has specific context implications during an element's design. -var LifecycleScopeType_Design = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/design"} +var LifecycleScopeType_Design = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/design"} // A relationship has specific context implications during development phase of an element. -var LifecycleScopeType_Development = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/development"} +var LifecycleScopeType_Development = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/development"} // A relationship has other specific context information necessary to capture that the above set of enumerations does not handle. -var LifecycleScopeType_Other = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/other"} +var LifecycleScopeType_Other = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/other"} // A relationship has specific context implications during the execution phase of an element. -var LifecycleScopeType_Runtime = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/runtime"} +var LifecycleScopeType_Runtime = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/runtime"} // A relationship has specific context implications during an element's testing phase, during development. -var LifecycleScopeType_Test = LifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/test"} +var LifecycleScopeType_Test = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/test"} // A mapping between prefixes and namespace partial URIs. type NamespaceMap struct { - ID string + ID string `iri:"@id"` // Provides an unambiguous mechanism for conveying a URI fragment portion of an // Element ID. - Namespace string + Namespace string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/namespace" iri-compact:"namespace"` // A substitute for a URI. - Prefix string + Prefix string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/prefix" iri-compact:"prefix"` } func castNamespaceMap(o any) *NamespaceMap { @@ -965,9 +926,6 @@ type AnyNamespaceMap interface { type NamespaceMapList []AnyNamespaceMap -func (o *NamespaceMapList) Append(values ...AnyNamespaceMap) { *o = append(*o, values...) } -func (o *NamespaceMapList) Remove(value AnyNamespaceMap) { remove(o, value) } - func (o *NamespaceMapList) NamespaceMapIter() iter.Seq2[AnyNamespaceMap, *NamespaceMap] { return typeIter(*o, castNamespaceMap) } @@ -977,12 +935,12 @@ type PackageVerificationCode struct { IntegrityMethod // Specifies the algorithm used for calculating the hash value. - Algorithm HashAlgorithm + Algorithm hashAlgorithm `iri:"https://spdx.org/rdf/3.0.1/terms/Core/algorithm" iri-compact:"algorithm"` // The result of applying a hash algorithm to an Element. - HashValue string + HashValue string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/hashValue" iri-compact:"hashValue"` // The relative file name of a file to be excluded from the // `PackageVerificationCode`. - PackageVerificationCodeExcludedFiles []string + PackageVerificationCodeExcludedFiles []string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/packageVerificationCodeExcludedFile" iri-compact:"packageVerificationCodeExcludedFile"` } func castPackageVerificationCode(o any) *PackageVerificationCode { @@ -1003,23 +961,18 @@ type AnyPackageVerificationCode interface { type PackageVerificationCodeList []AnyPackageVerificationCode -func (o *PackageVerificationCodeList) Append(values ...AnyPackageVerificationCode) { - *o = append(*o, values...) -} -func (o *PackageVerificationCodeList) Remove(value AnyPackageVerificationCode) { remove(o, value) } - func (o *PackageVerificationCodeList) PackageVerificationCodeIter() iter.Seq2[AnyPackageVerificationCode, *PackageVerificationCode] { return typeIter(*o, castPackageVerificationCode) } // A tuple of two positive integers that define a range. type PositiveIntegerRange struct { - ID string + ID string `iri:"@id"` // Defines the beginning of a range. - BeginIntegerRange int + BeginIntegerRange int `iri:"https://spdx.org/rdf/3.0.1/terms/Core/beginIntegerRange" iri-compact:"beginIntegerRange"` // Defines the end of a range. - EndIntegerRange int + EndIntegerRange int `iri:"https://spdx.org/rdf/3.0.1/terms/Core/endIntegerRange" iri-compact:"endIntegerRange"` } func castPositiveIntegerRange(o any) *PositiveIntegerRange { @@ -1039,81 +992,76 @@ type AnyPositiveIntegerRange interface { type PositiveIntegerRangeList []AnyPositiveIntegerRange -func (o *PositiveIntegerRangeList) Append(values ...AnyPositiveIntegerRange) { - *o = append(*o, values...) -} -func (o *PositiveIntegerRangeList) Remove(value AnyPositiveIntegerRange) { remove(o, value) } - func (o *PositiveIntegerRangeList) PositiveIntegerRangeIter() iter.Seq2[AnyPositiveIntegerRange, *PositiveIntegerRange] { return typeIter(*o, castPositiveIntegerRange) } // Categories of presence or absence. -type PresenceType struct { - ID string +type presenceType struct { + ID string `iri:"@id"` } // Indicates absence of the field. -var PresenceType_No = PresenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/no"} +var PresenceType_No = presenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/no"} // Makes no assertion about the field. -var PresenceType_NoAssertion = PresenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/noAssertion"} +var PresenceType_NoAssertion = presenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/noAssertion"} // Indicates presence of the field. -var PresenceType_Yes = PresenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/yes"} +var PresenceType_Yes = presenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/yes"} // Enumeration of the valid profiles. -type ProfileIdentifierType struct { - ID string +type profileIdentifierType struct { + ID string `iri:"@id"` } // the element follows the AI profile specification -var ProfileIdentifierType_Ai = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/ai"} +var ProfileIdentifierType_Ai = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/ai"} // the element follows the Build profile specification -var ProfileIdentifierType_Build = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/build"} +var ProfileIdentifierType_Build = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/build"} // the element follows the Core profile specification -var ProfileIdentifierType_Core = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/core"} +var ProfileIdentifierType_Core = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/core"} // the element follows the Dataset profile specification -var ProfileIdentifierType_Dataset = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/dataset"} +var ProfileIdentifierType_Dataset = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/dataset"} // the element follows the ExpandedLicensing profile specification -var ProfileIdentifierType_ExpandedLicensing = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/expandedLicensing"} +var ProfileIdentifierType_ExpandedLicensing = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/expandedLicensing"} // the element follows the Extension profile specification -var ProfileIdentifierType_Extension = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/extension"} +var ProfileIdentifierType_Extension = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/extension"} // the element follows the Lite profile specification -var ProfileIdentifierType_Lite = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/lite"} +var ProfileIdentifierType_Lite = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/lite"} // the element follows the Security profile specification -var ProfileIdentifierType_Security = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/security"} +var ProfileIdentifierType_Security = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/security"} // the element follows the SimpleLicensing profile specification -var ProfileIdentifierType_SimpleLicensing = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/simpleLicensing"} +var ProfileIdentifierType_SimpleLicensing = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/simpleLicensing"} // the element follows the Software profile specification -var ProfileIdentifierType_Software = ProfileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/software"} +var ProfileIdentifierType_Software = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/software"} // Describes a relationship between one or more elements. type Relationship struct { Element // Provides information about the completeness of relationships. - Completeness RelationshipCompleteness + Completeness relationshipCompleteness `iri:"https://spdx.org/rdf/3.0.1/terms/Core/completeness" iri-compact:"completeness"` // Specifies the time from which an element is no longer applicable / valid. - EndTime time.Time + EndTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/endTime" iri-compact:"endTime"` // References the Element on the left-hand side of a relationship. - From AnyElement + From AnyElement `iri:"https://spdx.org/rdf/3.0.1/terms/Core/from" iri-compact:"from"` // Information about the relationship between two Elements. - RelationshipType RelationshipType + RelationshipType relationshipType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/relationshipType" iri-compact:"relationshipType"` // Specifies the time from which an element is applicable / valid. - StartTime time.Time + StartTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/startTime" iri-compact:"startTime"` // References an Element on the right-hand side of a relationship. - Tos ElementList + Tos ElementList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/to" iri-compact:"to"` } func castRelationship(o any) *Relationship { @@ -1134,9 +1082,6 @@ type AnyRelationship interface { type RelationshipList []AnyRelationship -func (o *RelationshipList) Append(values ...AnyRelationship) { *o = append(*o, values...) } -func (o *RelationshipList) Remove(value AnyRelationship) { remove(o, value) } - func (o *RelationshipList) RelationshipIter() iter.Seq2[AnyRelationship, *Relationship] { return typeIter(*o, castRelationship) } @@ -1181,200 +1126,200 @@ func (o *RelationshipList) SecurityVexUnderInvestigationVulnAssessmentRelationsh } // Indicates whether a relationship is known to be complete, incomplete, or if no assertion is made with respect to relationship completeness. -type RelationshipCompleteness struct { - ID string +type relationshipCompleteness struct { + ID string `iri:"@id"` } // The relationship is known to be exhaustive. -var RelationshipCompleteness_Complete = RelationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/complete"} +var RelationshipCompleteness_Complete = relationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/complete"} // The relationship is known not to be exhaustive. -var RelationshipCompleteness_Incomplete = RelationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/incomplete"} +var RelationshipCompleteness_Incomplete = relationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/incomplete"} // No assertion can be made about the completeness of the relationship. -var RelationshipCompleteness_NoAssertion = RelationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/noAssertion"} +var RelationshipCompleteness_NoAssertion = relationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/noAssertion"} // Information about the relationship between two Elements. -type RelationshipType struct { - ID string +type relationshipType struct { + ID string `iri:"@id"` } // The `from` Vulnerability affects each `to` Element. The use of the `affects` type is constrained to `VexAffectedVulnAssessmentRelationship` classed relationships. -var RelationshipType_Affects = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/affects"} +var RelationshipType_Affects = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/affects"} // The `from` Element is amended by each `to` Element. -var RelationshipType_AmendedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/amendedBy"} +var RelationshipType_AmendedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/amendedBy"} // The `from` Element is an ancestor of each `to` Element. -var RelationshipType_AncestorOf = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/ancestorOf"} +var RelationshipType_AncestorOf = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/ancestorOf"} // The `from` Element is available from the additional supplier described by each `to` Element. -var RelationshipType_AvailableFrom = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/availableFrom"} +var RelationshipType_AvailableFrom = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/availableFrom"} // The `from` Element is a configuration applied to each `to` Element, during a LifecycleScopeType period. -var RelationshipType_Configures = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/configures"} +var RelationshipType_Configures = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/configures"} // The `from` Element contains each `to` Element. -var RelationshipType_Contains = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/contains"} +var RelationshipType_Contains = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/contains"} // The `from` Vulnerability is coordinatedBy the `to` Agent(s) (vendor, researcher, or consumer agent). -var RelationshipType_CoordinatedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/coordinatedBy"} +var RelationshipType_CoordinatedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/coordinatedBy"} // The `from` Element has been copied to each `to` Element. -var RelationshipType_CopiedTo = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/copiedTo"} +var RelationshipType_CopiedTo = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/copiedTo"} // The `from` Agent is delegating an action to the Agent of the `to` Relationship (which must be of type invokedBy), during a LifecycleScopeType (e.g. the `to` invokedBy Relationship is being done on behalf of `from`). -var RelationshipType_DelegatedTo = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/delegatedTo"} +var RelationshipType_DelegatedTo = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/delegatedTo"} // The `from` Element depends on each `to` Element, during a LifecycleScopeType period. -var RelationshipType_DependsOn = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/dependsOn"} +var RelationshipType_DependsOn = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/dependsOn"} // The `from` Element is a descendant of each `to` Element. -var RelationshipType_DescendantOf = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/descendantOf"} +var RelationshipType_DescendantOf = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/descendantOf"} // The `from` Element describes each `to` Element. To denote the root(s) of a tree of elements in a collection, the rootElement property should be used. -var RelationshipType_Describes = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/describes"} +var RelationshipType_Describes = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/describes"} // The `from` Vulnerability has no impact on each `to` Element. The use of the `doesNotAffect` is constrained to `VexNotAffectedVulnAssessmentRelationship` classed relationships. -var RelationshipType_DoesNotAffect = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/doesNotAffect"} +var RelationshipType_DoesNotAffect = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/doesNotAffect"} // The `from` archive expands out as an artifact described by each `to` Element. -var RelationshipType_ExpandsTo = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/expandsTo"} +var RelationshipType_ExpandsTo = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/expandsTo"} // The `from` Vulnerability has had an exploit created against it by each `to` Agent. -var RelationshipType_ExploitCreatedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/exploitCreatedBy"} +var RelationshipType_ExploitCreatedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/exploitCreatedBy"} // Designates a `from` Vulnerability has been fixed by the `to` Agent(s). -var RelationshipType_FixedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/fixedBy"} +var RelationshipType_FixedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/fixedBy"} // A `from` Vulnerability has been fixed in each `to` Element. The use of the `fixedIn` type is constrained to `VexFixedVulnAssessmentRelationship` classed relationships. -var RelationshipType_FixedIn = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/fixedIn"} +var RelationshipType_FixedIn = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/fixedIn"} // Designates a `from` Vulnerability was originally discovered by the `to` Agent(s). -var RelationshipType_FoundBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/foundBy"} +var RelationshipType_FoundBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/foundBy"} // The `from` Element generates each `to` Element. -var RelationshipType_Generates = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/generates"} +var RelationshipType_Generates = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/generates"} // Every `to` Element is a file added to the `from` Element (`from` hasAddedFile `to`). -var RelationshipType_HasAddedFile = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAddedFile"} +var RelationshipType_HasAddedFile = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAddedFile"} // Relates a `from` Vulnerability and each `to` Element with a security assessment. To be used with `VulnAssessmentRelationship` types. -var RelationshipType_HasAssessmentFor = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAssessmentFor"} +var RelationshipType_HasAssessmentFor = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAssessmentFor"} // Used to associate a `from` Artifact with each `to` Vulnerability. -var RelationshipType_HasAssociatedVulnerability = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAssociatedVulnerability"} +var RelationshipType_HasAssociatedVulnerability = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAssociatedVulnerability"} // The `from` SoftwareArtifact is concluded by the SPDX data creator to be governed by each `to` license. -var RelationshipType_HasConcludedLicense = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasConcludedLicense"} +var RelationshipType_HasConcludedLicense = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasConcludedLicense"} // The `from` Element treats each `to` Element as a data file. A data file is an artifact that stores data required or optional for the `from` Element's functionality. A data file can be a database file, an index file, a log file, an AI model file, a calibration data file, a temporary file, a backup file, and more. For AI training dataset, test dataset, test artifact, configuration data, build input data, and build output data, please consider using the more specific relationship types: `trainedOn`, `testedOn`, `hasTest`, `configures`, `hasInput`, and `hasOutput`, respectively. This relationship does not imply dependency. -var RelationshipType_HasDataFile = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDataFile"} +var RelationshipType_HasDataFile = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDataFile"} // The `from` SoftwareArtifact was discovered to actually contain each `to` license, for example as detected by use of automated tooling. -var RelationshipType_HasDeclaredLicense = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDeclaredLicense"} +var RelationshipType_HasDeclaredLicense = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDeclaredLicense"} // Every `to` Element is a file deleted from the `from` Element (`from` hasDeletedFile `to`). -var RelationshipType_HasDeletedFile = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDeletedFile"} +var RelationshipType_HasDeletedFile = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDeletedFile"} // The `from` Element has manifest files that contain dependency information in each `to` Element. -var RelationshipType_HasDependencyManifest = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDependencyManifest"} +var RelationshipType_HasDependencyManifest = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDependencyManifest"} // The `from` Element is distributed as an artifact in each `to` Element (e.g. an RPM or archive file). -var RelationshipType_HasDistributionArtifact = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDistributionArtifact"} +var RelationshipType_HasDistributionArtifact = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDistributionArtifact"} // The `from` Element is documented by each `to` Element. -var RelationshipType_HasDocumentation = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDocumentation"} +var RelationshipType_HasDocumentation = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDocumentation"} // The `from` Element dynamically links in each `to` Element, during a LifecycleScopeType period. -var RelationshipType_HasDynamicLink = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDynamicLink"} +var RelationshipType_HasDynamicLink = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDynamicLink"} // Every `to` Element is considered as evidence for the `from` Element (`from` hasEvidence `to`). -var RelationshipType_HasEvidence = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasEvidence"} +var RelationshipType_HasEvidence = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasEvidence"} // Every `to` Element is an example for the `from` Element (`from` hasExample `to`). -var RelationshipType_HasExample = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasExample"} +var RelationshipType_HasExample = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasExample"} // The `from` Build was run on the `to` Element during a LifecycleScopeType period (e.g. the host that the build runs on). -var RelationshipType_HasHost = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasHost"} +var RelationshipType_HasHost = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasHost"} // The `from` Build has each `to` Element as an input, during a LifecycleScopeType period. -var RelationshipType_HasInput = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasInput"} +var RelationshipType_HasInput = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasInput"} // Every `to` Element is metadata about the `from` Element (`from` hasMetadata `to`). -var RelationshipType_HasMetadata = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasMetadata"} +var RelationshipType_HasMetadata = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasMetadata"} // Every `to` Element is an optional component of the `from` Element (`from` hasOptionalComponent `to`). -var RelationshipType_HasOptionalComponent = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOptionalComponent"} +var RelationshipType_HasOptionalComponent = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOptionalComponent"} // The `from` Element optionally depends on each `to` Element, during a LifecycleScopeType period. -var RelationshipType_HasOptionalDependency = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOptionalDependency"} +var RelationshipType_HasOptionalDependency = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOptionalDependency"} // The `from` Build element generates each `to` Element as an output, during a LifecycleScopeType period. -var RelationshipType_HasOutput = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOutput"} +var RelationshipType_HasOutput = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOutput"} // The `from` Element has a prerequisite on each `to` Element, during a LifecycleScopeType period. -var RelationshipType_HasPrerequisite = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasPrerequisite"} +var RelationshipType_HasPrerequisite = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasPrerequisite"} // The `from` Element has a dependency on each `to` Element, dependency is not in the distributed artifact, but assumed to be provided, during a LifecycleScopeType period. -var RelationshipType_HasProvidedDependency = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasProvidedDependency"} +var RelationshipType_HasProvidedDependency = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasProvidedDependency"} // The `from` Element has a requirement on each `to` Element, during a LifecycleScopeType period. -var RelationshipType_HasRequirement = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasRequirement"} +var RelationshipType_HasRequirement = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasRequirement"} // Every `to` Element is a specification for the `from` Element (`from` hasSpecification `to`), during a LifecycleScopeType period. -var RelationshipType_HasSpecification = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasSpecification"} +var RelationshipType_HasSpecification = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasSpecification"} // The `from` Element statically links in each `to` Element, during a LifecycleScopeType period. -var RelationshipType_HasStaticLink = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasStaticLink"} +var RelationshipType_HasStaticLink = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasStaticLink"} // Every `to` Element is a test artifact for the `from` Element (`from` hasTest `to`), during a LifecycleScopeType period. -var RelationshipType_HasTest = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasTest"} +var RelationshipType_HasTest = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasTest"} // Every `to` Element is a test case for the `from` Element (`from` hasTestCase `to`). -var RelationshipType_HasTestCase = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasTestCase"} +var RelationshipType_HasTestCase = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasTestCase"} // Every `to` Element is a variant the `from` Element (`from` hasVariant `to`). -var RelationshipType_HasVariant = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasVariant"} +var RelationshipType_HasVariant = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasVariant"} // The `from` Element was invoked by the `to` Agent, during a LifecycleScopeType period (for example, a Build element that describes a build step). -var RelationshipType_InvokedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/invokedBy"} +var RelationshipType_InvokedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/invokedBy"} // The `from` Element is modified by each `to` Element. -var RelationshipType_ModifiedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/modifiedBy"} +var RelationshipType_ModifiedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/modifiedBy"} // Every `to` Element is related to the `from` Element where the relationship type is not described by any of the SPDX relationship types (this relationship is directionless). -var RelationshipType_Other = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/other"} +var RelationshipType_Other = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/other"} // Every `to` Element is a packaged instance of the `from` Element (`from` packagedBy `to`). -var RelationshipType_PackagedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/packagedBy"} +var RelationshipType_PackagedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/packagedBy"} // Every `to` Element is a patch for the `from` Element (`from` patchedBy `to`). -var RelationshipType_PatchedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/patchedBy"} +var RelationshipType_PatchedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/patchedBy"} // Designates a `from` Vulnerability was made available for public use or reference by each `to` Agent. -var RelationshipType_PublishedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/publishedBy"} +var RelationshipType_PublishedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/publishedBy"} // Designates a `from` Vulnerability was first reported to a project, vendor, or tracking database for formal identification by each `to` Agent. -var RelationshipType_ReportedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/reportedBy"} +var RelationshipType_ReportedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/reportedBy"} // Designates a `from` Vulnerability's details were tracked, aggregated, and/or enriched to improve context (i.e. NVD) by each `to` Agent. -var RelationshipType_RepublishedBy = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/republishedBy"} +var RelationshipType_RepublishedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/republishedBy"} // The `from` SpdxDocument can be found in a serialized form in each `to` Artifact. -var RelationshipType_SerializedInArtifact = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/serializedInArtifact"} +var RelationshipType_SerializedInArtifact = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/serializedInArtifact"} // The `from` Element has been tested on the `to` Element(s). -var RelationshipType_TestedOn = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/testedOn"} +var RelationshipType_TestedOn = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/testedOn"} // The `from` Element has been trained on the `to` Element(s). -var RelationshipType_TrainedOn = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/trainedOn"} +var RelationshipType_TrainedOn = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/trainedOn"} // The `from` Vulnerability impact is being investigated for each `to` Element. The use of the `underInvestigationFor` type is constrained to `VexUnderInvestigationVulnAssessmentRelationship` classed relationships. -var RelationshipType_UnderInvestigationFor = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/underInvestigationFor"} +var RelationshipType_UnderInvestigationFor = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/underInvestigationFor"} // The `from` Element uses each `to` Element as a tool, during a LifecycleScopeType period. -var RelationshipType_UsesTool = RelationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/usesTool"} +var RelationshipType_UsesTool = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/usesTool"} // A collection of SPDX Elements that could potentially be serialized. type SpdxDocument struct { @@ -1382,13 +1327,13 @@ type SpdxDocument struct { // Provides the license under which the SPDX documentation of the Element can be // used. - DataLicense AnySimplelicensingAnyLicenseInfo + DataLicense AnySimplelicensingAnyLicenseInfo `iri:"https://spdx.org/rdf/3.0.1/terms/Core/dataLicense" iri-compact:"dataLicense"` // Provides an ExternalMap of Element identifiers. - Imports ExternalMapList + Imports ExternalMapList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/import" iri-compact:"import"` // Provides a NamespaceMap of prefixes and associated namespace partial URIs applicable to an SpdxDocument and independent of any specific serialization format or instance. - NamespaceMaps NamespaceMapList + NamespaceMaps NamespaceMapList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/namespaceMap" iri-compact:"namespaceMap"` } func castSpdxDocument(o any) *SpdxDocument { @@ -1409,38 +1354,35 @@ type AnySpdxDocument interface { type SpdxDocumentList []AnySpdxDocument -func (o *SpdxDocumentList) Append(values ...AnySpdxDocument) { *o = append(*o, values...) } -func (o *SpdxDocumentList) Remove(value AnySpdxDocument) { remove(o, value) } - func (o *SpdxDocumentList) SpdxDocumentIter() iter.Seq2[AnySpdxDocument, *SpdxDocument] { return typeIter(*o, castSpdxDocument) } // Indicates the type of support that is associated with an artifact. -type SupportType struct { - ID string +type supportType struct { + ID string `iri:"@id"` } // in addition to being supported by the supplier, the software is known to have been deployed and is in use. For a software as a service provider, this implies the software is now available as a service. -var SupportType_Deployed = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/deployed"} +var SupportType_Deployed = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/deployed"} // the artifact is in active development and is not considered ready for formal support from the supplier. -var SupportType_Development = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/development"} +var SupportType_Development = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/development"} // there is a defined end of support for the artifact from the supplier. This may also be referred to as end of life. There is a validUntilDate that can be used to signal when support ends for the artifact. -var SupportType_EndOfSupport = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/endOfSupport"} +var SupportType_EndOfSupport = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/endOfSupport"} // the artifact has been released, and there is limited support available from the supplier. There is a validUntilDate that can provide additional information about the duration of support. -var SupportType_LimitedSupport = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/limitedSupport"} +var SupportType_LimitedSupport = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/limitedSupport"} // no assertion about the type of support is made. This is considered the default if no other support type is used. -var SupportType_NoAssertion = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/noAssertion"} +var SupportType_NoAssertion = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/noAssertion"} // there is no support for the artifact from the supplier, consumer assumes any support obligations. -var SupportType_NoSupport = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/noSupport"} +var SupportType_NoSupport = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/noSupport"} // the artifact has been released, and is supported from the supplier. There is a validUntilDate that can provide additional information about the duration of support. -var SupportType_Support = SupportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/support"} +var SupportType_Support = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/support"} // An element of hardware and/or software utilized to carry out a particular function. type Tool struct { @@ -1465,94 +1407,91 @@ type AnyTool interface { type ToolList []AnyTool -func (o *ToolList) Append(values ...AnyTool) { *o = append(*o, values...) } -func (o *ToolList) Remove(value AnyTool) { remove(o, value) } - func (o *ToolList) ToolIter() iter.Seq2[AnyTool, *Tool] { return typeIter(*o, castTool) } // Categories of confidentiality level. -type DatasetConfidentialityLevelType struct { - ID string +type datasetConfidentialityLevelType struct { + ID string `iri:"@id"` } // Data points in the dataset can be shared only with specific organizations and their clients on a need to know basis. -var DatasetConfidentialityLevelType_Amber = DatasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/amber"} +var DatasetConfidentialityLevelType_Amber = datasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/amber"} // Dataset may be distributed freely, without restriction. -var DatasetConfidentialityLevelType_Clear = DatasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/clear"} +var DatasetConfidentialityLevelType_Clear = datasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/clear"} // Dataset can be shared within a community of peers and partners. -var DatasetConfidentialityLevelType_Green = DatasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/green"} +var DatasetConfidentialityLevelType_Green = datasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/green"} // Data points in the dataset are highly confidential and can only be shared with named recipients. -var DatasetConfidentialityLevelType_Red = DatasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/red"} +var DatasetConfidentialityLevelType_Red = datasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/red"} // Availability of dataset. -type DatasetDatasetAvailabilityType struct { - ID string +type datasetDatasetAvailabilityType struct { + ID string `iri:"@id"` } // the dataset is not publicly available and can only be accessed after affirmatively accepting terms on a clickthrough webpage. -var DatasetDatasetAvailabilityType_Clickthrough = DatasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/clickthrough"} +var DatasetDatasetAvailabilityType_Clickthrough = datasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/clickthrough"} // the dataset is publicly available and can be downloaded directly. -var DatasetDatasetAvailabilityType_DirectDownload = DatasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/directDownload"} +var DatasetDatasetAvailabilityType_DirectDownload = datasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/directDownload"} // the dataset is publicly available, but not all at once, and can only be accessed through queries which return parts of the dataset. -var DatasetDatasetAvailabilityType_Query = DatasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/query"} +var DatasetDatasetAvailabilityType_Query = datasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/query"} // the dataset is not publicly available and an email registration is required before accessing the dataset, although without an affirmative acceptance of terms. -var DatasetDatasetAvailabilityType_Registration = DatasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/registration"} +var DatasetDatasetAvailabilityType_Registration = datasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/registration"} // the dataset provider is not making available the underlying data and the dataset must be reassembled, typically using the provided script for scraping the data. -var DatasetDatasetAvailabilityType_ScrapingScript = DatasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/scrapingScript"} +var DatasetDatasetAvailabilityType_ScrapingScript = datasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/scrapingScript"} // Enumeration of dataset types. -type DatasetDatasetType struct { - ID string +type datasetDatasetType struct { + ID string `iri:"@id"` } // data is audio based, such as a collection of music from the 80s. -var DatasetDatasetType_Audio = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/audio"} +var DatasetDatasetType_Audio = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/audio"} // data that is classified into a discrete number of categories, such as the eye color of a population of people. -var DatasetDatasetType_Categorical = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/categorical"} +var DatasetDatasetType_Categorical = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/categorical"} // data is in the form of a graph where entries are somehow related to each other through edges, such a social network of friends. -var DatasetDatasetType_Graph = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/graph"} +var DatasetDatasetType_Graph = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/graph"} // data is a collection of images such as pictures of animals. -var DatasetDatasetType_Image = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/image"} +var DatasetDatasetType_Image = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/image"} // data type is not known. -var DatasetDatasetType_NoAssertion = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/noAssertion"} +var DatasetDatasetType_NoAssertion = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/noAssertion"} // data consists only of numeric entries. -var DatasetDatasetType_Numeric = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/numeric"} +var DatasetDatasetType_Numeric = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/numeric"} // data is of a type not included in this list. -var DatasetDatasetType_Other = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/other"} +var DatasetDatasetType_Other = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/other"} // data is recorded from a physical sensor, such as a thermometer reading or biometric device. -var DatasetDatasetType_Sensor = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/sensor"} +var DatasetDatasetType_Sensor = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/sensor"} // data is stored in tabular format or retrieved from a relational database. -var DatasetDatasetType_Structured = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/structured"} +var DatasetDatasetType_Structured = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/structured"} // data describes the syntax or semantics of a language or text, such as a parse tree used for natural language processing. -var DatasetDatasetType_Syntactic = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/syntactic"} +var DatasetDatasetType_Syntactic = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/syntactic"} // data consists of unstructured text, such as a book, Wikipedia article (without images), or transcript. -var DatasetDatasetType_Text = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/text"} +var DatasetDatasetType_Text = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/text"} // data is recorded in an ordered sequence of timestamped entries, such as the price of a stock over the course of a day. -var DatasetDatasetType_Timeseries = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/timeseries"} +var DatasetDatasetType_Timeseries = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/timeseries"} // data is recorded with a timestamp for each entry, but not necessarily ordered or at specific intervals, such as when a taxi ride starts and ends. -var DatasetDatasetType_Timestamp = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/timestamp"} +var DatasetDatasetType_Timestamp = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/timestamp"} // data is video based, such as a collection of movie clips featuring Tom Hanks. -var DatasetDatasetType_Video = DatasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/video"} +var DatasetDatasetType_Video = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/video"} // Abstract class for additional text intended to be added to a License, but // which is not itself a standalone License. @@ -1560,19 +1499,19 @@ type ExpandedlicensingLicenseAddition struct { Element // Identifies the full text of a LicenseAddition. - ExpandedlicensingAdditionText string + ExpandedlicensingAdditionText string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/additionText" iri-compact:"expandedlicensing_additionText"` // Specifies whether an additional text identifier has been marked as deprecated. - ExpandedlicensingIsDeprecatedAdditionId bool + ExpandedlicensingIsDeprecatedAdditionId bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isDeprecatedAdditionId" iri-compact:"expandedlicensing_isDeprecatedAdditionId"` // Identifies all the text and metadata associated with a license in the license // XML format. - ExpandedlicensingLicenseXml string + ExpandedlicensingLicenseXml string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` // Specifies the licenseId that is preferred to be used in place of a deprecated // License or LicenseAddition. - ExpandedlicensingObsoletedBy string + ExpandedlicensingObsoletedBy string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` // Contains a URL where the License or LicenseAddition can be found in use. - ExpandedlicensingSeeAlsos []string + ExpandedlicensingSeeAlsos []string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` // Identifies the full text of a LicenseAddition, in SPDX templating format. - ExpandedlicensingStandardAdditionTemplate string + ExpandedlicensingStandardAdditionTemplate string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardAdditionTemplate" iri-compact:"expandedlicensing_standardAdditionTemplate"` } func castExpandedlicensingLicenseAddition(o any) *ExpandedlicensingLicenseAddition { @@ -1593,13 +1532,6 @@ type AnyExpandedlicensingLicenseAddition interface { type ExpandedlicensingLicenseAdditionList []AnyExpandedlicensingLicenseAddition -func (o *ExpandedlicensingLicenseAdditionList) Append(values ...AnyExpandedlicensingLicenseAddition) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingLicenseAdditionList) Remove(value AnyExpandedlicensingLicenseAddition) { - remove(o, value) -} - func (o *ExpandedlicensingLicenseAdditionList) ExpandedlicensingLicenseAdditionIter() iter.Seq2[AnyExpandedlicensingLicenseAddition, *ExpandedlicensingLicenseAddition] { return typeIter(*o, castExpandedlicensingLicenseAddition) } @@ -1616,10 +1548,10 @@ type ExpandedlicensingListedLicenseException struct { // Specifies the SPDX License List version in which this license or exception // identifier was deprecated. - ExpandedlicensingDeprecatedVersion string + ExpandedlicensingDeprecatedVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/deprecatedVersion" iri-compact:"expandedlicensing_deprecatedVersion"` // Specifies the SPDX License List version in which this ListedLicense or // ListedLicenseException identifier was first added. - ExpandedlicensingListVersionAdded string + ExpandedlicensingListVersionAdded string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/listVersionAdded" iri-compact:"expandedlicensing_listVersionAdded"` } func castExpandedlicensingListedLicenseException(o any) *ExpandedlicensingListedLicenseException { @@ -1640,25 +1572,18 @@ type AnyExpandedlicensingListedLicenseException interface { type ExpandedlicensingListedLicenseExceptionList []AnyExpandedlicensingListedLicenseException -func (o *ExpandedlicensingListedLicenseExceptionList) Append(values ...AnyExpandedlicensingListedLicenseException) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingListedLicenseExceptionList) Remove(value AnyExpandedlicensingListedLicenseException) { - remove(o, value) -} - func (o *ExpandedlicensingListedLicenseExceptionList) ExpandedlicensingListedLicenseExceptionIter() iter.Seq2[AnyExpandedlicensingListedLicenseException, *ExpandedlicensingListedLicenseException] { return typeIter(*o, castExpandedlicensingListedLicenseException) } // A property name with an associated value. type ExtensionCdxPropertyEntry struct { - ID string + ID string `iri:"@id"` // A name used in a CdxPropertyEntry name-value pair. - ExtensionCdxPropName string + ExtensionCdxPropName string `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/cdxPropName" iri-compact:"extension_cdxPropName"` // A value used in a CdxPropertyEntry name-value pair. - ExtensionCdxPropValue string + ExtensionCdxPropValue string `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/cdxPropValue" iri-compact:"extension_cdxPropValue"` } func castExtensionCdxPropertyEntry(o any) *ExtensionCdxPropertyEntry { @@ -1678,18 +1603,13 @@ type AnyExtensionCdxPropertyEntry interface { type ExtensionCdxPropertyEntryList []AnyExtensionCdxPropertyEntry -func (o *ExtensionCdxPropertyEntryList) Append(values ...AnyExtensionCdxPropertyEntry) { - *o = append(*o, values...) -} -func (o *ExtensionCdxPropertyEntryList) Remove(value AnyExtensionCdxPropertyEntry) { remove(o, value) } - func (o *ExtensionCdxPropertyEntryList) ExtensionCdxPropertyEntryIter() iter.Seq2[AnyExtensionCdxPropertyEntry, *ExtensionCdxPropertyEntry] { return typeIter(*o, castExtensionCdxPropertyEntry) } // A characterization of some aspect of an Element that is associated with the Element in a generalized fashion. type ExtensionExtension struct { - ID string + ID string `iri:"@id"` } func castExtensionExtension(o any) *ExtensionExtension { @@ -1709,9 +1629,6 @@ type AnyExtensionExtension interface { type ExtensionExtensionList []AnyExtensionExtension -func (o *ExtensionExtensionList) Append(values ...AnyExtensionExtension) { *o = append(*o, values...) } -func (o *ExtensionExtensionList) Remove(value AnyExtensionExtension) { remove(o, value) } - func (o *ExtensionExtensionList) ExtensionExtensionIter() iter.Seq2[AnyExtensionExtension, *ExtensionExtension] { return typeIter(*o, castExtensionExtension) } @@ -1720,72 +1637,72 @@ func (o *ExtensionExtensionList) ExtensionCdxPropertiesExtensionIter() iter.Seq2 } // Specifies the CVSS base, temporal, threat, or environmental severity type. -type SecurityCvssSeverityType struct { - ID string +type securityCvssSeverityType struct { + ID string `iri:"@id"` } // When a CVSS score is between 9.0 - 10.0 -var SecurityCvssSeverityType_Critical = SecurityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/critical"} +var SecurityCvssSeverityType_Critical = securityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/critical"} // When a CVSS score is between 7.0 - 8.9 -var SecurityCvssSeverityType_High = SecurityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/high"} +var SecurityCvssSeverityType_High = securityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/high"} // When a CVSS score is between 0.1 - 3.9 -var SecurityCvssSeverityType_Low = SecurityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/low"} +var SecurityCvssSeverityType_Low = securityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/low"} // When a CVSS score is between 4.0 - 6.9 -var SecurityCvssSeverityType_Medium = SecurityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/medium"} +var SecurityCvssSeverityType_Medium = securityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/medium"} // When a CVSS score is 0.0 -var SecurityCvssSeverityType_None = SecurityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/none"} +var SecurityCvssSeverityType_None = securityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/none"} // Specifies the exploit catalog type. -type SecurityExploitCatalogType struct { - ID string +type securityExploitCatalogType struct { + ID string `iri:"@id"` } // CISA's Known Exploited Vulnerability (KEV) Catalog -var SecurityExploitCatalogType_Kev = SecurityExploitCatalogType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType/kev"} +var SecurityExploitCatalogType_Kev = securityExploitCatalogType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType/kev"} // Other exploit catalogs -var SecurityExploitCatalogType_Other = SecurityExploitCatalogType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType/other"} +var SecurityExploitCatalogType_Other = securityExploitCatalogType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType/other"} // Specifies the SSVC decision type. -type SecuritySsvcDecisionType struct { - ID string +type securitySsvcDecisionType struct { + ID string `iri:"@id"` } // The vulnerability requires attention from the organization's internal, supervisory-level and leadership-level individuals. Necessary actions include requesting assistance or information about the vulnerability, as well as publishing a notification either internally and/or externally. Typically, internal groups would meet to determine the overall response and then execute agreed upon actions. CISA recommends remediating Act vulnerabilities as soon as possible. -var SecuritySsvcDecisionType_Act = SecuritySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/act"} +var SecuritySsvcDecisionType_Act = securitySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/act"} // The vulnerability requires attention from the organization's internal, supervisory-level individuals. Necessary actions include requesting assistance or information about the vulnerability, and may involve publishing a notification either internally and/or externally. CISA recommends remediating Attend vulnerabilities sooner than standard update timelines. -var SecuritySsvcDecisionType_Attend = SecuritySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/attend"} +var SecuritySsvcDecisionType_Attend = securitySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/attend"} // The vulnerability does not require action at this time. The organization would continue to track the vulnerability and reassess it if new information becomes available. CISA recommends remediating Track vulnerabilities within standard update timelines. -var SecuritySsvcDecisionType_Track = SecuritySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/track"} +var SecuritySsvcDecisionType_Track = securitySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/track"} // ("Track\*" in the SSVC spec) The vulnerability contains specific characteristics that may require closer monitoring for changes. CISA recommends remediating Track\* vulnerabilities within standard update timelines. -var SecuritySsvcDecisionType_TrackStar = SecuritySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/trackStar"} +var SecuritySsvcDecisionType_TrackStar = securitySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/trackStar"} // Specifies the VEX justification type. -type SecurityVexJustificationType struct { - ID string +type securityVexJustificationType struct { + ID string `iri:"@id"` } // The software is not affected because the vulnerable component is not in the product. -var SecurityVexJustificationType_ComponentNotPresent = SecurityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/componentNotPresent"} +var SecurityVexJustificationType_ComponentNotPresent = securityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/componentNotPresent"} // Built-in inline controls or mitigations prevent an adversary from leveraging the vulnerability. -var SecurityVexJustificationType_InlineMitigationsAlreadyExist = SecurityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/inlineMitigationsAlreadyExist"} +var SecurityVexJustificationType_InlineMitigationsAlreadyExist = securityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/inlineMitigationsAlreadyExist"} // The vulnerable component is present, and the component contains the vulnerable code. However, vulnerable code is used in such a way that an attacker cannot mount any anticipated attack. -var SecurityVexJustificationType_VulnerableCodeCannotBeControlledByAdversary = SecurityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeCannotBeControlledByAdversary"} +var SecurityVexJustificationType_VulnerableCodeCannotBeControlledByAdversary = securityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeCannotBeControlledByAdversary"} // The affected code is not reachable through the execution of the code, including non-anticipated states of the product. -var SecurityVexJustificationType_VulnerableCodeNotInExecutePath = SecurityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeNotInExecutePath"} +var SecurityVexJustificationType_VulnerableCodeNotInExecutePath = securityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeNotInExecutePath"} // The product is not affected because the code underlying the vulnerability is not present in the product. -var SecurityVexJustificationType_VulnerableCodeNotPresent = SecurityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeNotPresent"} +var SecurityVexJustificationType_VulnerableCodeNotPresent = securityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeNotPresent"} // Abstract ancestor class for all vulnerability assessments type SecurityVulnAssessmentRelationship struct { @@ -1793,18 +1710,18 @@ type SecurityVulnAssessmentRelationship struct { // Identifies who or what supplied the artifact or VulnAssessmentRelationship // referenced by the Element. - SuppliedBy AnyAgent + SuppliedBy AnyAgent `iri:"https://spdx.org/rdf/3.0.1/terms/Core/suppliedBy" iri-compact:"suppliedBy"` // Specifies an Element contained in a piece of software where a vulnerability was // found. - SecurityAssessedElement AnySoftwareSoftwareArtifact + SecurityAssessedElement AnySoftwareSoftwareArtifact `iri:"https://spdx.org/rdf/3.0.1/terms/Security/assessedElement" iri-compact:"security_assessedElement"` // Specifies a time when a vulnerability assessment was modified - SecurityModifiedTime time.Time + SecurityModifiedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` // Specifies the time when a vulnerability was published. - SecurityPublishedTime time.Time + SecurityPublishedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/publishedTime" iri-compact:"security_publishedTime"` // Specified the time and date when a vulnerability was withdrawn. - SecurityWithdrawnTime time.Time + SecurityWithdrawnTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` } func castSecurityVulnAssessmentRelationship(o any) *SecurityVulnAssessmentRelationship { @@ -1825,13 +1742,6 @@ type AnySecurityVulnAssessmentRelationship interface { type SecurityVulnAssessmentRelationshipList []AnySecurityVulnAssessmentRelationship -func (o *SecurityVulnAssessmentRelationshipList) Append(values ...AnySecurityVulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecurityVulnAssessmentRelationshipList) Remove(value AnySecurityVulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecurityVulnAssessmentRelationshipList) SecurityVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVulnAssessmentRelationship] { return typeIter(*o, castSecurityVulnAssessmentRelationship) } @@ -1892,13 +1802,6 @@ type AnySimplelicensingAnyLicenseInfo interface { type SimplelicensingAnyLicenseInfoList []AnySimplelicensingAnyLicenseInfo -func (o *SimplelicensingAnyLicenseInfoList) Append(values ...AnySimplelicensingAnyLicenseInfo) { - *o = append(*o, values...) -} -func (o *SimplelicensingAnyLicenseInfoList) Remove(value AnySimplelicensingAnyLicenseInfo) { - remove(o, value) -} - func (o *SimplelicensingAnyLicenseInfoList) SimplelicensingAnyLicenseInfoIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *SimplelicensingAnyLicenseInfo] { return typeIter(*o, castSimplelicensingAnyLicenseInfo) } @@ -1939,12 +1842,12 @@ type SimplelicensingLicenseExpression struct { // Maps a LicenseRef or AdditionRef string for a Custom License or a Custom // License Addition to its URI ID. - SimplelicensingCustomIdToUris DictionaryEntryList + SimplelicensingCustomIdToUris DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/customIdToUri" iri-compact:"simplelicensing_customIdToUri"` // A string in the license expression format. - SimplelicensingLicenseExpression string + SimplelicensingLicenseExpression string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseExpression" iri-compact:"simplelicensing_licenseExpression"` // The version of the SPDX License List used in the license expression. - SimplelicensingLicenseListVersion string + SimplelicensingLicenseListVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseListVersion" iri-compact:"simplelicensing_licenseListVersion"` } func castSimplelicensingLicenseExpression(o any) *SimplelicensingLicenseExpression { @@ -1965,13 +1868,6 @@ type AnySimplelicensingLicenseExpression interface { type SimplelicensingLicenseExpressionList []AnySimplelicensingLicenseExpression -func (o *SimplelicensingLicenseExpressionList) Append(values ...AnySimplelicensingLicenseExpression) { - *o = append(*o, values...) -} -func (o *SimplelicensingLicenseExpressionList) Remove(value AnySimplelicensingLicenseExpression) { - remove(o, value) -} - func (o *SimplelicensingLicenseExpressionList) SimplelicensingLicenseExpressionIter() iter.Seq2[AnySimplelicensingLicenseExpression, *SimplelicensingLicenseExpression] { return typeIter(*o, castSimplelicensingLicenseExpression) } @@ -1981,7 +1877,7 @@ type SimplelicensingSimpleLicensingText struct { Element // Identifies the full text of a License or Addition. - SimplelicensingLicenseText string + SimplelicensingLicenseText string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` } func castSimplelicensingSimpleLicensingText(o any) *SimplelicensingSimpleLicensingText { @@ -2002,13 +1898,6 @@ type AnySimplelicensingSimpleLicensingText interface { type SimplelicensingSimpleLicensingTextList []AnySimplelicensingSimpleLicensingText -func (o *SimplelicensingSimpleLicensingTextList) Append(values ...AnySimplelicensingSimpleLicensingText) { - *o = append(*o, values...) -} -func (o *SimplelicensingSimpleLicensingTextList) Remove(value AnySimplelicensingSimpleLicensingText) { - remove(o, value) -} - func (o *SimplelicensingSimpleLicensingTextList) SimplelicensingSimpleLicensingTextIter() iter.Seq2[AnySimplelicensingSimpleLicensingText, *SimplelicensingSimpleLicensingText] { return typeIter(*o, castSimplelicensingSimpleLicensingText) } @@ -2018,9 +1907,9 @@ type SoftwareContentIdentifier struct { IntegrityMethod // Specifies the type of the content identifier. - SoftwareContentIdentifierType SoftwareContentIdentifierType + SoftwareContentIdentifierType softwareContentIdentifierType `iri:"https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifierType" iri-compact:"software_contentIdentifierType"` // Specifies the value of the content identifier. - SoftwareContentIdentifierValue string + SoftwareContentIdentifierValue string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifierValue" iri-compact:"software_contentIdentifierValue"` } func castSoftwareContentIdentifier(o any) *SoftwareContentIdentifier { @@ -2041,180 +1930,175 @@ type AnySoftwareContentIdentifier interface { type SoftwareContentIdentifierList []AnySoftwareContentIdentifier -func (o *SoftwareContentIdentifierList) Append(values ...AnySoftwareContentIdentifier) { - *o = append(*o, values...) -} -func (o *SoftwareContentIdentifierList) Remove(value AnySoftwareContentIdentifier) { remove(o, value) } - func (o *SoftwareContentIdentifierList) SoftwareContentIdentifierIter() iter.Seq2[AnySoftwareContentIdentifier, *SoftwareContentIdentifier] { return typeIter(*o, castSoftwareContentIdentifier) } // Specifies the type of a content identifier. -type SoftwareContentIdentifierType struct { - ID string +type softwareContentIdentifierType struct { + ID string `iri:"@id"` } // [Gitoid](https://www.iana.org/assignments/uri-schemes/prov/gitoid), stands for [Git Object ID](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). A gitoid of type blob is a unique hash of a binary artifact. A gitoid may represent either an [Artifact Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-identifier-types) for the software artifact or an [Input Manifest Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#input-manifest-identifier) for the software artifact's associated [Artifact Input Manifest](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-input-manifest); this ambiguity exists because the Artifact Input Manifest is itself an artifact, and the gitoid of that artifact is its valid identifier. Gitoids calculated on software artifacts (Snippet, File, or Package Elements) should be recorded in the SPDX 3.0 SoftwareArtifact's contentIdentifier property. Gitoids calculated on the Artifact Input Manifest (Input Manifest Identifier) should be recorded in the SPDX 3.0 Element's externalIdentifier property. See [OmniBOR Specification](https://github.com/omnibor/spec/), a minimalistic specification for describing software [Artifact Dependency Graphs](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-dependency-graph-adg). -var SoftwareContentIdentifierType_Gitoid = SoftwareContentIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType/gitoid"} +var SoftwareContentIdentifierType_Gitoid = softwareContentIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType/gitoid"} // SoftWare Hash IDentifier, a persistent intrinsic identifier for digital artifacts, such as files, trees (also known as directories or folders), commits, and other objects typically found in version control systems. The format of the identifiers is defined in the [SWHID specification](https://www.swhid.org/specification/v1.1/4.Syntax) (ISO/IEC DIS 18670). They typically look like `swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2`. -var SoftwareContentIdentifierType_Swhid = SoftwareContentIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType/swhid"} +var SoftwareContentIdentifierType_Swhid = softwareContentIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType/swhid"} // Enumeration of the different kinds of SPDX file. -type SoftwareFileKindType struct { - ID string +type softwareFileKindType struct { + ID string `iri:"@id"` } // The file represents a directory and all content stored in that directory. -var SoftwareFileKindType_Directory = SoftwareFileKindType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType/directory"} +var SoftwareFileKindType_Directory = softwareFileKindType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType/directory"} // The file represents a single file (default). -var SoftwareFileKindType_File = SoftwareFileKindType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType/file"} +var SoftwareFileKindType_File = softwareFileKindType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType/file"} // Provides a set of values to be used to describe the common types of SBOMs that // tools may create. -type SoftwareSbomType struct { - ID string +type softwareSbomType struct { + ID string `iri:"@id"` } // SBOM generated through analysis of artifacts (e.g., executables, packages, containers, and virtual machine images) after its build. Such analysis generally requires a variety of heuristics. In some contexts, this may also be referred to as a "3rd party" SBOM. -var SoftwareSbomType_Analyzed = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/analyzed"} +var SoftwareSbomType_Analyzed = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/analyzed"} // SBOM generated as part of the process of building the software to create a releasable artifact (e.g., executable or package) from data such as source files, dependencies, built components, build process ephemeral data, and other SBOMs. -var SoftwareSbomType_Build = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/build"} +var SoftwareSbomType_Build = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/build"} // SBOM provides an inventory of software that is present on a system. This may be an assembly of other SBOMs that combines analysis of configuration options, and examination of execution behavior in a (potentially simulated) deployment environment. -var SoftwareSbomType_Deployed = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/deployed"} +var SoftwareSbomType_Deployed = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/deployed"} // SBOM of intended, planned software project or product with included components (some of which may not yet exist) for a new software artifact. -var SoftwareSbomType_Design = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/design"} +var SoftwareSbomType_Design = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/design"} // SBOM generated through instrumenting the system running the software, to capture only components present in the system, as well as external call-outs or dynamically loaded components. In some contexts, this may also be referred to as an "Instrumented" or "Dynamic" SBOM. -var SoftwareSbomType_Runtime = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/runtime"} +var SoftwareSbomType_Runtime = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/runtime"} // SBOM created directly from the development environment, source files, and included dependencies used to build an product artifact. -var SoftwareSbomType_Source = SoftwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/source"} +var SoftwareSbomType_Source = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/source"} // Provides information about the primary purpose of an Element. -type SoftwareSoftwarePurpose struct { - ID string +type softwareSoftwarePurpose struct { + ID string `iri:"@id"` } // The Element is a software application. -var SoftwareSoftwarePurpose_Application = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/application"} +var SoftwareSoftwarePurpose_Application = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/application"} // The Element is an archived collection of one or more files (.tar, .zip, etc.). -var SoftwareSoftwarePurpose_Archive = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/archive"} +var SoftwareSoftwarePurpose_Archive = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/archive"} // The Element is a bill of materials. -var SoftwareSoftwarePurpose_Bom = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/bom"} +var SoftwareSoftwarePurpose_Bom = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/bom"} // The Element is configuration data. -var SoftwareSoftwarePurpose_Configuration = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/configuration"} +var SoftwareSoftwarePurpose_Configuration = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/configuration"} // The Element is a container image which can be used by a container runtime application. -var SoftwareSoftwarePurpose_Container = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/container"} +var SoftwareSoftwarePurpose_Container = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/container"} // The Element is data. -var SoftwareSoftwarePurpose_Data = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/data"} +var SoftwareSoftwarePurpose_Data = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/data"} // The Element refers to a chipset, processor, or electronic board. -var SoftwareSoftwarePurpose_Device = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/device"} +var SoftwareSoftwarePurpose_Device = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/device"} // The Element represents software that controls hardware devices. -var SoftwareSoftwarePurpose_DeviceDriver = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/deviceDriver"} +var SoftwareSoftwarePurpose_DeviceDriver = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/deviceDriver"} // The Element refers to a disk image that can be written to a disk, booted in a VM, etc. A disk image typically contains most or all of the components necessary to boot, such as bootloaders, kernels, firmware, userspace, etc. -var SoftwareSoftwarePurpose_DiskImage = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/diskImage"} +var SoftwareSoftwarePurpose_DiskImage = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/diskImage"} // The Element is documentation. -var SoftwareSoftwarePurpose_Documentation = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/documentation"} +var SoftwareSoftwarePurpose_Documentation = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/documentation"} // The Element is the evidence that a specification or requirement has been fulfilled. -var SoftwareSoftwarePurpose_Evidence = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/evidence"} +var SoftwareSoftwarePurpose_Evidence = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/evidence"} // The Element is an Artifact that can be run on a computer. -var SoftwareSoftwarePurpose_Executable = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/executable"} +var SoftwareSoftwarePurpose_Executable = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/executable"} // The Element is a single file which can be independently distributed (configuration file, statically linked binary, Kubernetes deployment, etc.). -var SoftwareSoftwarePurpose_File = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/file"} +var SoftwareSoftwarePurpose_File = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/file"} // The Element is a file system image that can be written to a disk (or virtual) partition. -var SoftwareSoftwarePurpose_FilesystemImage = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/filesystemImage"} +var SoftwareSoftwarePurpose_FilesystemImage = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/filesystemImage"} // The Element provides low level control over a device's hardware. -var SoftwareSoftwarePurpose_Firmware = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/firmware"} +var SoftwareSoftwarePurpose_Firmware = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/firmware"} // The Element is a software framework. -var SoftwareSoftwarePurpose_Framework = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/framework"} +var SoftwareSoftwarePurpose_Framework = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/framework"} // The Element is used to install software on disk. -var SoftwareSoftwarePurpose_Install = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/install"} +var SoftwareSoftwarePurpose_Install = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/install"} // The Element is a software library. -var SoftwareSoftwarePurpose_Library = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/library"} +var SoftwareSoftwarePurpose_Library = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/library"} // The Element is a software manifest. -var SoftwareSoftwarePurpose_Manifest = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/manifest"} +var SoftwareSoftwarePurpose_Manifest = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/manifest"} // The Element is a machine learning or artificial intelligence model. -var SoftwareSoftwarePurpose_Model = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/model"} +var SoftwareSoftwarePurpose_Model = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/model"} // The Element is a module of a piece of software. -var SoftwareSoftwarePurpose_Module = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/module"} +var SoftwareSoftwarePurpose_Module = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/module"} // The Element is an operating system. -var SoftwareSoftwarePurpose_OperatingSystem = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/operatingSystem"} +var SoftwareSoftwarePurpose_OperatingSystem = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/operatingSystem"} // The Element doesn't fit into any of the other categories. -var SoftwareSoftwarePurpose_Other = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/other"} +var SoftwareSoftwarePurpose_Other = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/other"} // The Element contains a set of changes to update, fix, or improve another Element. -var SoftwareSoftwarePurpose_Patch = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/patch"} +var SoftwareSoftwarePurpose_Patch = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/patch"} // The Element represents a runtime environment. -var SoftwareSoftwarePurpose_Platform = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/platform"} +var SoftwareSoftwarePurpose_Platform = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/platform"} // The Element provides a requirement needed as input for another Element. -var SoftwareSoftwarePurpose_Requirement = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/requirement"} +var SoftwareSoftwarePurpose_Requirement = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/requirement"} // The Element is a single or a collection of source files. -var SoftwareSoftwarePurpose_Source = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/source"} +var SoftwareSoftwarePurpose_Source = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/source"} // The Element is a plan, guideline or strategy how to create, perform or analyze an application. -var SoftwareSoftwarePurpose_Specification = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/specification"} +var SoftwareSoftwarePurpose_Specification = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/specification"} // The Element is a test used to verify functionality on an software element. -var SoftwareSoftwarePurpose_Test = SoftwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/test"} +var SoftwareSoftwarePurpose_Test = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/test"} // Class that describes a build instance of software/artifacts. type BuildBuild struct { Element // Property that describes the time at which a build stops. - BuildBuildEndTime time.Time + BuildBuildEndTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildEndTime" iri-compact:"build_buildEndTime"` // A buildId is a locally unique identifier used by a builder to identify a unique // instance of a build produced by it. - BuildBuildId string + BuildBuildId string `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildId" iri-compact:"build_buildId"` // Property describing the start time of a build. - BuildBuildStartTime time.Time + BuildBuildStartTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildStartTime" iri-compact:"build_buildStartTime"` // A buildType is a hint that is used to indicate the toolchain, platform, or // infrastructure that the build was invoked on. - BuildBuildType string + BuildBuildType string `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildType" iri-compact:"build_buildType"` // Property that describes the digest of the build configuration file used to // invoke a build. - BuildConfigSourceDigests HashList + BuildConfigSourceDigests HashList `iri:"https://spdx.org/rdf/3.0.1/terms/Build/configSourceDigest" iri-compact:"build_configSourceDigest"` // Property describes the invocation entrypoint of a build. - BuildConfigSourceEntrypoints []string + BuildConfigSourceEntrypoints []string `iri:"https://spdx.org/rdf/3.0.1/terms/Build/configSourceEntrypoint" iri-compact:"build_configSourceEntrypoint"` // Property that describes the URI of the build configuration source file. - BuildConfigSourceUris []string + BuildConfigSourceUris []string `iri:"https://spdx.org/rdf/3.0.1/terms/Build/configSourceUri" iri-compact:"build_configSourceUri"` // Property describing the session in which a build is invoked. - BuildEnvironments DictionaryEntryList + BuildEnvironments DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Build/environment" iri-compact:"build_environment"` // Property describing a parameter used in an instance of a build. - BuildParameters DictionaryEntryList + BuildParameters DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Build/parameter" iri-compact:"build_parameter"` } func castBuildBuild(o any) *BuildBuild { @@ -2235,9 +2119,6 @@ type AnyBuildBuild interface { type BuildBuildList []AnyBuildBuild -func (o *BuildBuildList) Append(values ...AnyBuildBuild) { *o = append(*o, values...) } -func (o *BuildBuildList) Remove(value AnyBuildBuild) { remove(o, value) } - func (o *BuildBuildList) BuildBuildIter() iter.Seq2[AnyBuildBuild, *BuildBuild] { return typeIter(*o, castBuildBuild) } @@ -2265,9 +2146,6 @@ type AnyAgent interface { type AgentList []AnyAgent -func (o *AgentList) Append(values ...AnyAgent) { *o = append(*o, values...) } -func (o *AgentList) Remove(value AnyAgent) { remove(o, value) } - func (o *AgentList) AgentIter() iter.Seq2[AnyAgent, *Agent] { return typeIter(*o, castAgent) } func (o *AgentList) OrganizationIter() iter.Seq2[AnyAgent, *Organization] { return typeIter(*o, castOrganization) @@ -2282,13 +2160,13 @@ type Annotation struct { Element // Describes the type of annotation. - AnnotationType AnnotationType + AnnotationType annotationType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/annotationType" iri-compact:"annotationType"` // Provides information about the content type of an Element or a Property. - ContentType string + ContentType string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/contentType" iri-compact:"contentType"` // Commentary on an assertion that an annotator has made. - Statement string + Statement string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/statement" iri-compact:"statement"` // An Element an annotator has made an assertion about. - Subject AnyElement + Subject AnyElement `iri:"https://spdx.org/rdf/3.0.1/terms/Core/subject" iri-compact:"subject"` } func castAnnotation(o any) *Annotation { @@ -2309,9 +2187,6 @@ type AnyAnnotation interface { type AnnotationList []AnyAnnotation -func (o *AnnotationList) Append(values ...AnyAnnotation) { *o = append(*o, values...) } -func (o *AnnotationList) Remove(value AnyAnnotation) { remove(o, value) } - func (o *AnnotationList) AnnotationIter() iter.Seq2[AnyAnnotation, *Annotation] { return typeIter(*o, castAnnotation) } @@ -2321,23 +2196,23 @@ type Artifact struct { Element // Specifies the time an artifact was built. - BuiltTime time.Time + BuiltTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/builtTime" iri-compact:"builtTime"` // Identifies from where or whom the Element originally came. - OriginatedBys AgentList + OriginatedBys AgentList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/originatedBy" iri-compact:"originatedBy"` // Specifies the time an artifact was released. - ReleaseTime time.Time + ReleaseTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/releaseTime" iri-compact:"releaseTime"` // The name of a relevant standard that may apply to an artifact. - StandardNames []string + StandardNames []string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/standardName" iri-compact:"standardName"` // Identifies who or what supplied the artifact or VulnAssessmentRelationship // referenced by the Element. - SuppliedBy AnyAgent + SuppliedBy AnyAgent `iri:"https://spdx.org/rdf/3.0.1/terms/Core/suppliedBy" iri-compact:"suppliedBy"` // Specifies the level of support associated with an artifact. - SupportLevels []SupportType + SupportLevels []supportType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/supportLevel" iri-compact:"supportLevel"` // Specifies until when the artifact can be used before its usage needs to be // reassessed. - ValidUntilTime time.Time + ValidUntilTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/validUntilTime" iri-compact:"validUntilTime"` } func castArtifact(o any) *Artifact { @@ -2358,9 +2233,6 @@ type AnyArtifact interface { type ArtifactList []AnyArtifact -func (o *ArtifactList) Append(values ...AnyArtifact) { *o = append(*o, values...) } -func (o *ArtifactList) Remove(value AnyArtifact) { remove(o, value) } - func (o *ArtifactList) ArtifactIter() iter.Seq2[AnyArtifact, *Artifact] { return typeIter(*o, castArtifact) } @@ -2392,7 +2264,7 @@ type Bundle struct { // Gives information about the circumstances or unifying properties // that Elements of the bundle have been assembled under. - Context string + Context string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/context" iri-compact:"context"` } func castBundle(o any) *Bundle { @@ -2413,9 +2285,6 @@ type AnyBundle interface { type BundleList []AnyBundle -func (o *BundleList) Append(values ...AnyBundle) { *o = append(*o, values...) } -func (o *BundleList) Remove(value AnyBundle) { remove(o, value) } - func (o *BundleList) BundleIter() iter.Seq2[AnyBundle, *Bundle] { return typeIter(*o, castBundle) } func (o *BundleList) BomIter() iter.Seq2[AnyBundle, *Bom] { return typeIter(*o, castBom) } func (o *BundleList) SoftwareSbomIter() iter.Seq2[AnyBundle, *SoftwareSbom] { @@ -2427,9 +2296,9 @@ type Hash struct { IntegrityMethod // Specifies the algorithm used for calculating the hash value. - Algorithm HashAlgorithm + Algorithm hashAlgorithm `iri:"https://spdx.org/rdf/3.0.1/terms/Core/algorithm" iri-compact:"algorithm"` // The result of applying a hash algorithm to an Element. - HashValue string + HashValue string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/hashValue" iri-compact:"hashValue"` } func castHash(o any) *Hash { @@ -2450,9 +2319,6 @@ type AnyHash interface { type HashList []AnyHash -func (o *HashList) Append(values ...AnyHash) { *o = append(*o, values...) } -func (o *HashList) Remove(value AnyHash) { remove(o, value) } - func (o *HashList) HashIter() iter.Seq2[AnyHash, *Hash] { return typeIter(*o, castHash) } // Provide context for a relationship that occurs in the lifecycle. @@ -2460,7 +2326,7 @@ type LifecycleScopedRelationship struct { Relationship // Capture the scope of information about a specific relationship between elements. - Scope LifecycleScopeType + Scope lifecycleScopeType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/scope" iri-compact:"scope"` } func castLifecycleScopedRelationship(o any) *LifecycleScopedRelationship { @@ -2481,13 +2347,6 @@ type AnyLifecycleScopedRelationship interface { type LifecycleScopedRelationshipList []AnyLifecycleScopedRelationship -func (o *LifecycleScopedRelationshipList) Append(values ...AnyLifecycleScopedRelationship) { - *o = append(*o, values...) -} -func (o *LifecycleScopedRelationshipList) Remove(value AnyLifecycleScopedRelationship) { - remove(o, value) -} - func (o *LifecycleScopedRelationshipList) LifecycleScopedRelationshipIter() iter.Seq2[AnyLifecycleScopedRelationship, *LifecycleScopedRelationship] { return typeIter(*o, castLifecycleScopedRelationship) } @@ -2518,9 +2377,6 @@ type AnyOrganization interface { type OrganizationList []AnyOrganization -func (o *OrganizationList) Append(values ...AnyOrganization) { *o = append(*o, values...) } -func (o *OrganizationList) Remove(value AnyOrganization) { remove(o, value) } - func (o *OrganizationList) OrganizationIter() iter.Seq2[AnyOrganization, *Organization] { return typeIter(*o, castOrganization) } @@ -2548,9 +2404,6 @@ type AnyPerson interface { type PersonList []AnyPerson -func (o *PersonList) Append(values ...AnyPerson) { *o = append(*o, values...) } -func (o *PersonList) Remove(value AnyPerson) { remove(o, value) } - func (o *PersonList) PersonIter() iter.Seq2[AnyPerson, *Person] { return typeIter(*o, castPerson) } // A software agent. @@ -2576,9 +2429,6 @@ type AnySoftwareAgent interface { type SoftwareAgentList []AnySoftwareAgent -func (o *SoftwareAgentList) Append(values ...AnySoftwareAgent) { *o = append(*o, values...) } -func (o *SoftwareAgentList) Remove(value AnySoftwareAgent) { remove(o, value) } - func (o *SoftwareAgentList) SoftwareAgentIter() iter.Seq2[AnySoftwareAgent, *SoftwareAgent] { return typeIter(*o, castSoftwareAgent) } @@ -2589,7 +2439,7 @@ type ExpandedlicensingConjunctiveLicenseSet struct { SimplelicensingAnyLicenseInfo // A license expression participating in a license set. - ExpandedlicensingMembers SimplelicensingAnyLicenseInfoList + ExpandedlicensingMembers SimplelicensingAnyLicenseInfoList `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/member" iri-compact:"expandedlicensing_member"` } func castExpandedlicensingConjunctiveLicenseSet(o any) *ExpandedlicensingConjunctiveLicenseSet { @@ -2610,13 +2460,6 @@ type AnyExpandedlicensingConjunctiveLicenseSet interface { type ExpandedlicensingConjunctiveLicenseSetList []AnyExpandedlicensingConjunctiveLicenseSet -func (o *ExpandedlicensingConjunctiveLicenseSetList) Append(values ...AnyExpandedlicensingConjunctiveLicenseSet) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingConjunctiveLicenseSetList) Remove(value AnyExpandedlicensingConjunctiveLicenseSet) { - remove(o, value) -} - func (o *ExpandedlicensingConjunctiveLicenseSetList) ExpandedlicensingConjunctiveLicenseSetIter() iter.Seq2[AnyExpandedlicensingConjunctiveLicenseSet, *ExpandedlicensingConjunctiveLicenseSet] { return typeIter(*o, castExpandedlicensingConjunctiveLicenseSet) } @@ -2644,13 +2487,6 @@ type AnyExpandedlicensingCustomLicenseAddition interface { type ExpandedlicensingCustomLicenseAdditionList []AnyExpandedlicensingCustomLicenseAddition -func (o *ExpandedlicensingCustomLicenseAdditionList) Append(values ...AnyExpandedlicensingCustomLicenseAddition) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingCustomLicenseAdditionList) Remove(value AnyExpandedlicensingCustomLicenseAddition) { - remove(o, value) -} - func (o *ExpandedlicensingCustomLicenseAdditionList) ExpandedlicensingCustomLicenseAdditionIter() iter.Seq2[AnyExpandedlicensingCustomLicenseAddition, *ExpandedlicensingCustomLicenseAddition] { return typeIter(*o, castExpandedlicensingCustomLicenseAddition) } @@ -2661,7 +2497,7 @@ type ExpandedlicensingDisjunctiveLicenseSet struct { SimplelicensingAnyLicenseInfo // A license expression participating in a license set. - ExpandedlicensingMembers SimplelicensingAnyLicenseInfoList + ExpandedlicensingMembers SimplelicensingAnyLicenseInfoList `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/member" iri-compact:"expandedlicensing_member"` } func castExpandedlicensingDisjunctiveLicenseSet(o any) *ExpandedlicensingDisjunctiveLicenseSet { @@ -2682,13 +2518,6 @@ type AnyExpandedlicensingDisjunctiveLicenseSet interface { type ExpandedlicensingDisjunctiveLicenseSetList []AnyExpandedlicensingDisjunctiveLicenseSet -func (o *ExpandedlicensingDisjunctiveLicenseSetList) Append(values ...AnyExpandedlicensingDisjunctiveLicenseSet) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingDisjunctiveLicenseSetList) Remove(value AnyExpandedlicensingDisjunctiveLicenseSet) { - remove(o, value) -} - func (o *ExpandedlicensingDisjunctiveLicenseSetList) ExpandedlicensingDisjunctiveLicenseSetIter() iter.Seq2[AnyExpandedlicensingDisjunctiveLicenseSet, *ExpandedlicensingDisjunctiveLicenseSet] { return typeIter(*o, castExpandedlicensingDisjunctiveLicenseSet) } @@ -2716,13 +2545,6 @@ type AnyExpandedlicensingExtendableLicense interface { type ExpandedlicensingExtendableLicenseList []AnyExpandedlicensingExtendableLicense -func (o *ExpandedlicensingExtendableLicenseList) Append(values ...AnyExpandedlicensingExtendableLicense) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingExtendableLicenseList) Remove(value AnyExpandedlicensingExtendableLicense) { - remove(o, value) -} - func (o *ExpandedlicensingExtendableLicenseList) ExpandedlicensingExtendableLicenseIter() iter.Seq2[AnyExpandedlicensingExtendableLicense, *ExpandedlicensingExtendableLicense] { return typeIter(*o, castExpandedlicensingExtendableLicense) } @@ -2771,13 +2593,6 @@ type AnyExpandedlicensingIndividualLicensingInfo interface { type ExpandedlicensingIndividualLicensingInfoList []AnyExpandedlicensingIndividualLicensingInfo -func (o *ExpandedlicensingIndividualLicensingInfoList) Append(values ...AnyExpandedlicensingIndividualLicensingInfo) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingIndividualLicensingInfoList) Remove(value AnyExpandedlicensingIndividualLicensingInfo) { - remove(o, value) -} - func (o *ExpandedlicensingIndividualLicensingInfoList) ExpandedlicensingIndividualLicensingInfoIter() iter.Seq2[AnyExpandedlicensingIndividualLicensingInfo, *ExpandedlicensingIndividualLicensingInfo] { return typeIter(*o, castExpandedlicensingIndividualLicensingInfo) } @@ -2788,28 +2603,28 @@ type ExpandedlicensingLicense struct { // Specifies whether a license or additional text identifier has been marked as // deprecated. - ExpandedlicensingIsDeprecatedLicenseId bool + ExpandedlicensingIsDeprecatedLicenseId bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isDeprecatedLicenseId" iri-compact:"expandedlicensing_isDeprecatedLicenseId"` // Specifies whether the License is listed as free by the // Free Software Foundation (FSF). - ExpandedlicensingIsFsfLibre bool + ExpandedlicensingIsFsfLibre bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isFsfLibre" iri-compact:"expandedlicensing_isFsfLibre"` // Specifies whether the License is listed as approved by the // Open Source Initiative (OSI). - ExpandedlicensingIsOsiApproved bool + ExpandedlicensingIsOsiApproved bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isOsiApproved" iri-compact:"expandedlicensing_isOsiApproved"` // Identifies all the text and metadata associated with a license in the license // XML format. - ExpandedlicensingLicenseXml string + ExpandedlicensingLicenseXml string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` // Specifies the licenseId that is preferred to be used in place of a deprecated // License or LicenseAddition. - ExpandedlicensingObsoletedBy string + ExpandedlicensingObsoletedBy string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` // Contains a URL where the License or LicenseAddition can be found in use. - ExpandedlicensingSeeAlsos []string + ExpandedlicensingSeeAlsos []string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` // Provides a License author's preferred text to indicate that a file is covered // by the License. - ExpandedlicensingStandardLicenseHeader string + ExpandedlicensingStandardLicenseHeader string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardLicenseHeader" iri-compact:"expandedlicensing_standardLicenseHeader"` // Identifies the full text of a License, in SPDX templating format. - ExpandedlicensingStandardLicenseTemplate string + ExpandedlicensingStandardLicenseTemplate string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardLicenseTemplate" iri-compact:"expandedlicensing_standardLicenseTemplate"` // Identifies the full text of a License or Addition. - SimplelicensingLicenseText string + SimplelicensingLicenseText string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` } func castExpandedlicensingLicense(o any) *ExpandedlicensingLicense { @@ -2830,11 +2645,6 @@ type AnyExpandedlicensingLicense interface { type ExpandedlicensingLicenseList []AnyExpandedlicensingLicense -func (o *ExpandedlicensingLicenseList) Append(values ...AnyExpandedlicensingLicense) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingLicenseList) Remove(value AnyExpandedlicensingLicense) { remove(o, value) } - func (o *ExpandedlicensingLicenseList) ExpandedlicensingLicenseIter() iter.Seq2[AnyExpandedlicensingLicense, *ExpandedlicensingLicense] { return typeIter(*o, castExpandedlicensingLicense) } @@ -2851,10 +2661,10 @@ type ExpandedlicensingListedLicense struct { // Specifies the SPDX License List version in which this license or exception // identifier was deprecated. - ExpandedlicensingDeprecatedVersion string + ExpandedlicensingDeprecatedVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/deprecatedVersion" iri-compact:"expandedlicensing_deprecatedVersion"` // Specifies the SPDX License List version in which this ListedLicense or // ListedLicenseException identifier was first added. - ExpandedlicensingListVersionAdded string + ExpandedlicensingListVersionAdded string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/listVersionAdded" iri-compact:"expandedlicensing_listVersionAdded"` } func castExpandedlicensingListedLicense(o any) *ExpandedlicensingListedLicense { @@ -2875,13 +2685,6 @@ type AnyExpandedlicensingListedLicense interface { type ExpandedlicensingListedLicenseList []AnyExpandedlicensingListedLicense -func (o *ExpandedlicensingListedLicenseList) Append(values ...AnyExpandedlicensingListedLicense) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingListedLicenseList) Remove(value AnyExpandedlicensingListedLicense) { - remove(o, value) -} - func (o *ExpandedlicensingListedLicenseList) ExpandedlicensingListedLicenseIter() iter.Seq2[AnyExpandedlicensingListedLicense, *ExpandedlicensingListedLicense] { return typeIter(*o, castExpandedlicensingListedLicense) } @@ -2892,7 +2695,7 @@ type ExpandedlicensingOrLaterOperator struct { ExpandedlicensingExtendableLicense // A License participating in an 'or later' model. - ExpandedlicensingSubjectLicense AnyExpandedlicensingLicense + ExpandedlicensingSubjectLicense AnyExpandedlicensingLicense `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectLicense" iri-compact:"expandedlicensing_subjectLicense"` } func castExpandedlicensingOrLaterOperator(o any) *ExpandedlicensingOrLaterOperator { @@ -2913,13 +2716,6 @@ type AnyExpandedlicensingOrLaterOperator interface { type ExpandedlicensingOrLaterOperatorList []AnyExpandedlicensingOrLaterOperator -func (o *ExpandedlicensingOrLaterOperatorList) Append(values ...AnyExpandedlicensingOrLaterOperator) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingOrLaterOperatorList) Remove(value AnyExpandedlicensingOrLaterOperator) { - remove(o, value) -} - func (o *ExpandedlicensingOrLaterOperatorList) ExpandedlicensingOrLaterOperatorIter() iter.Seq2[AnyExpandedlicensingOrLaterOperator, *ExpandedlicensingOrLaterOperator] { return typeIter(*o, castExpandedlicensingOrLaterOperator) } @@ -2930,10 +2726,10 @@ type ExpandedlicensingWithAdditionOperator struct { SimplelicensingAnyLicenseInfo // A LicenseAddition participating in a 'with addition' model. - ExpandedlicensingSubjectAddition AnyExpandedlicensingLicenseAddition + ExpandedlicensingSubjectAddition AnyExpandedlicensingLicenseAddition `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectAddition" iri-compact:"expandedlicensing_subjectAddition"` // A License participating in a 'with addition' model. - ExpandedlicensingSubjectExtendableLicense AnyExpandedlicensingExtendableLicense + ExpandedlicensingSubjectExtendableLicense AnyExpandedlicensingExtendableLicense `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectExtendableLicense" iri-compact:"expandedlicensing_subjectExtendableLicense"` } func castExpandedlicensingWithAdditionOperator(o any) *ExpandedlicensingWithAdditionOperator { @@ -2954,13 +2750,6 @@ type AnyExpandedlicensingWithAdditionOperator interface { type ExpandedlicensingWithAdditionOperatorList []AnyExpandedlicensingWithAdditionOperator -func (o *ExpandedlicensingWithAdditionOperatorList) Append(values ...AnyExpandedlicensingWithAdditionOperator) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingWithAdditionOperatorList) Remove(value AnyExpandedlicensingWithAdditionOperator) { - remove(o, value) -} - func (o *ExpandedlicensingWithAdditionOperatorList) ExpandedlicensingWithAdditionOperatorIter() iter.Seq2[AnyExpandedlicensingWithAdditionOperator, *ExpandedlicensingWithAdditionOperator] { return typeIter(*o, castExpandedlicensingWithAdditionOperator) } @@ -2970,7 +2759,7 @@ type ExtensionCdxPropertiesExtension struct { ExtensionExtension // Provides a map of a property names to a values. - ExtensionCdxPropertys ExtensionCdxPropertyEntryList + ExtensionCdxPropertys ExtensionCdxPropertyEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/cdxProperty" iri-compact:"extension_cdxProperty"` } func castExtensionCdxPropertiesExtension(o any) *ExtensionCdxPropertiesExtension { @@ -2991,13 +2780,6 @@ type AnyExtensionCdxPropertiesExtension interface { type ExtensionCdxPropertiesExtensionList []AnyExtensionCdxPropertiesExtension -func (o *ExtensionCdxPropertiesExtensionList) Append(values ...AnyExtensionCdxPropertiesExtension) { - *o = append(*o, values...) -} -func (o *ExtensionCdxPropertiesExtensionList) Remove(value AnyExtensionCdxPropertiesExtension) { - remove(o, value) -} - func (o *ExtensionCdxPropertiesExtensionList) ExtensionCdxPropertiesExtensionIter() iter.Seq2[AnyExtensionCdxPropertiesExtension, *ExtensionCdxPropertiesExtension] { return typeIter(*o, castExtensionCdxPropertiesExtension) } @@ -3007,9 +2789,9 @@ type SecurityCvssV2VulnAssessmentRelationship struct { SecurityVulnAssessmentRelationship // Provides a numerical (0-10) representation of the severity of a vulnerability. - SecurityScore float64 + SecurityScore float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/score" iri-compact:"security_score"` // Specifies the CVSS vector string for a vulnerability. - SecurityVectorString string + SecurityVectorString string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vectorString" iri-compact:"security_vectorString"` } func castSecurityCvssV2VulnAssessmentRelationship(o any) *SecurityCvssV2VulnAssessmentRelationship { @@ -3030,13 +2812,6 @@ type AnySecurityCvssV2VulnAssessmentRelationship interface { type SecurityCvssV2VulnAssessmentRelationshipList []AnySecurityCvssV2VulnAssessmentRelationship -func (o *SecurityCvssV2VulnAssessmentRelationshipList) Append(values ...AnySecurityCvssV2VulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecurityCvssV2VulnAssessmentRelationshipList) Remove(value AnySecurityCvssV2VulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecurityCvssV2VulnAssessmentRelationshipList) SecurityCvssV2VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityCvssV2VulnAssessmentRelationship, *SecurityCvssV2VulnAssessmentRelationship] { return typeIter(*o, castSecurityCvssV2VulnAssessmentRelationship) } @@ -3046,11 +2821,11 @@ type SecurityCvssV3VulnAssessmentRelationship struct { SecurityVulnAssessmentRelationship // Provides a numerical (0-10) representation of the severity of a vulnerability. - SecurityScore float64 + SecurityScore float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/score" iri-compact:"security_score"` // Specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. - SecuritySeverity SecurityCvssSeverityType + SecuritySeverity securityCvssSeverityType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/severity" iri-compact:"security_severity"` // Specifies the CVSS vector string for a vulnerability. - SecurityVectorString string + SecurityVectorString string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vectorString" iri-compact:"security_vectorString"` } func castSecurityCvssV3VulnAssessmentRelationship(o any) *SecurityCvssV3VulnAssessmentRelationship { @@ -3071,13 +2846,6 @@ type AnySecurityCvssV3VulnAssessmentRelationship interface { type SecurityCvssV3VulnAssessmentRelationshipList []AnySecurityCvssV3VulnAssessmentRelationship -func (o *SecurityCvssV3VulnAssessmentRelationshipList) Append(values ...AnySecurityCvssV3VulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecurityCvssV3VulnAssessmentRelationshipList) Remove(value AnySecurityCvssV3VulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecurityCvssV3VulnAssessmentRelationshipList) SecurityCvssV3VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityCvssV3VulnAssessmentRelationship, *SecurityCvssV3VulnAssessmentRelationship] { return typeIter(*o, castSecurityCvssV3VulnAssessmentRelationship) } @@ -3087,11 +2855,11 @@ type SecurityCvssV4VulnAssessmentRelationship struct { SecurityVulnAssessmentRelationship // Provides a numerical (0-10) representation of the severity of a vulnerability. - SecurityScore float64 + SecurityScore float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/score" iri-compact:"security_score"` // Specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. - SecuritySeverity SecurityCvssSeverityType + SecuritySeverity securityCvssSeverityType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/severity" iri-compact:"security_severity"` // Specifies the CVSS vector string for a vulnerability. - SecurityVectorString string + SecurityVectorString string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vectorString" iri-compact:"security_vectorString"` } func castSecurityCvssV4VulnAssessmentRelationship(o any) *SecurityCvssV4VulnAssessmentRelationship { @@ -3112,13 +2880,6 @@ type AnySecurityCvssV4VulnAssessmentRelationship interface { type SecurityCvssV4VulnAssessmentRelationshipList []AnySecurityCvssV4VulnAssessmentRelationship -func (o *SecurityCvssV4VulnAssessmentRelationshipList) Append(values ...AnySecurityCvssV4VulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecurityCvssV4VulnAssessmentRelationshipList) Remove(value AnySecurityCvssV4VulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecurityCvssV4VulnAssessmentRelationshipList) SecurityCvssV4VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityCvssV4VulnAssessmentRelationship, *SecurityCvssV4VulnAssessmentRelationship] { return typeIter(*o, castSecurityCvssV4VulnAssessmentRelationship) } @@ -3128,9 +2889,9 @@ type SecurityEpssVulnAssessmentRelationship struct { SecurityVulnAssessmentRelationship // The percentile of the current probability score. - SecurityPercentile float64 + SecurityPercentile float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/percentile" iri-compact:"security_percentile"` // A probability score between 0 and 1 of a vulnerability being exploited. - SecurityProbability float64 + SecurityProbability float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/probability" iri-compact:"security_probability"` } func castSecurityEpssVulnAssessmentRelationship(o any) *SecurityEpssVulnAssessmentRelationship { @@ -3151,13 +2912,6 @@ type AnySecurityEpssVulnAssessmentRelationship interface { type SecurityEpssVulnAssessmentRelationshipList []AnySecurityEpssVulnAssessmentRelationship -func (o *SecurityEpssVulnAssessmentRelationshipList) Append(values ...AnySecurityEpssVulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecurityEpssVulnAssessmentRelationshipList) Remove(value AnySecurityEpssVulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecurityEpssVulnAssessmentRelationshipList) SecurityEpssVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityEpssVulnAssessmentRelationship, *SecurityEpssVulnAssessmentRelationship] { return typeIter(*o, castSecurityEpssVulnAssessmentRelationship) } @@ -3167,11 +2921,11 @@ type SecurityExploitCatalogVulnAssessmentRelationship struct { SecurityVulnAssessmentRelationship // Specifies the exploit catalog type. - SecurityCatalogType SecurityExploitCatalogType + SecurityCatalogType securityExploitCatalogType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/catalogType" iri-compact:"security_catalogType"` // Describe that a CVE is known to have an exploit because it's been listed in an exploit catalog. - SecurityExploited bool + SecurityExploited bool `iri:"https://spdx.org/rdf/3.0.1/terms/Security/exploited" iri-compact:"security_exploited"` // Provides the location of an exploit catalog. - SecurityLocator string + SecurityLocator string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/locator" iri-compact:"security_locator"` } func castSecurityExploitCatalogVulnAssessmentRelationship(o any) *SecurityExploitCatalogVulnAssessmentRelationship { @@ -3192,13 +2946,6 @@ type AnySecurityExploitCatalogVulnAssessmentRelationship interface { type SecurityExploitCatalogVulnAssessmentRelationshipList []AnySecurityExploitCatalogVulnAssessmentRelationship -func (o *SecurityExploitCatalogVulnAssessmentRelationshipList) Append(values ...AnySecurityExploitCatalogVulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecurityExploitCatalogVulnAssessmentRelationshipList) Remove(value AnySecurityExploitCatalogVulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecurityExploitCatalogVulnAssessmentRelationshipList) SecurityExploitCatalogVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityExploitCatalogVulnAssessmentRelationship, *SecurityExploitCatalogVulnAssessmentRelationship] { return typeIter(*o, castSecurityExploitCatalogVulnAssessmentRelationship) } @@ -3209,7 +2956,7 @@ type SecuritySsvcVulnAssessmentRelationship struct { // Provide the enumeration of possible decisions in the // [Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree](https://www.cisa.gov/stakeholder-specific-vulnerability-categorization-ssvc). - SecurityDecisionType SecuritySsvcDecisionType + SecurityDecisionType securitySsvcDecisionType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/decisionType" iri-compact:"security_decisionType"` } func castSecuritySsvcVulnAssessmentRelationship(o any) *SecuritySsvcVulnAssessmentRelationship { @@ -3230,13 +2977,6 @@ type AnySecuritySsvcVulnAssessmentRelationship interface { type SecuritySsvcVulnAssessmentRelationshipList []AnySecuritySsvcVulnAssessmentRelationship -func (o *SecuritySsvcVulnAssessmentRelationshipList) Append(values ...AnySecuritySsvcVulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecuritySsvcVulnAssessmentRelationshipList) Remove(value AnySecuritySsvcVulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecuritySsvcVulnAssessmentRelationshipList) SecuritySsvcVulnAssessmentRelationshipIter() iter.Seq2[AnySecuritySsvcVulnAssessmentRelationship, *SecuritySsvcVulnAssessmentRelationship] { return typeIter(*o, castSecuritySsvcVulnAssessmentRelationship) } @@ -3246,9 +2986,9 @@ type SecurityVexVulnAssessmentRelationship struct { SecurityVulnAssessmentRelationship // Conveys information about how VEX status was determined. - SecurityStatusNotes string + SecurityStatusNotes string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/statusNotes" iri-compact:"security_statusNotes"` // Specifies the version of a VEX statement. - SecurityVexVersion string + SecurityVexVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vexVersion" iri-compact:"security_vexVersion"` } func castSecurityVexVulnAssessmentRelationship(o any) *SecurityVexVulnAssessmentRelationship { @@ -3269,13 +3009,6 @@ type AnySecurityVexVulnAssessmentRelationship interface { type SecurityVexVulnAssessmentRelationshipList []AnySecurityVexVulnAssessmentRelationship -func (o *SecurityVexVulnAssessmentRelationshipList) Append(values ...AnySecurityVexVulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecurityVexVulnAssessmentRelationshipList) Remove(value AnySecurityVexVulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecurityVexVulnAssessmentRelationshipList) SecurityVexVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexVulnAssessmentRelationship, *SecurityVexVulnAssessmentRelationship] { return typeIter(*o, castSecurityVexVulnAssessmentRelationship) } @@ -3297,11 +3030,11 @@ type SecurityVulnerability struct { Artifact // Specifies a time when a vulnerability assessment was modified - SecurityModifiedTime time.Time + SecurityModifiedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` // Specifies the time when a vulnerability was published. - SecurityPublishedTime time.Time + SecurityPublishedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/publishedTime" iri-compact:"security_publishedTime"` // Specified the time and date when a vulnerability was withdrawn. - SecurityWithdrawnTime time.Time + SecurityWithdrawnTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` } func castSecurityVulnerability(o any) *SecurityVulnerability { @@ -3322,11 +3055,6 @@ type AnySecurityVulnerability interface { type SecurityVulnerabilityList []AnySecurityVulnerability -func (o *SecurityVulnerabilityList) Append(values ...AnySecurityVulnerability) { - *o = append(*o, values...) -} -func (o *SecurityVulnerabilityList) Remove(value AnySecurityVulnerability) { remove(o, value) } - func (o *SecurityVulnerabilityList) SecurityVulnerabilityIter() iter.Seq2[AnySecurityVulnerability, *SecurityVulnerability] { return typeIter(*o, castSecurityVulnerability) } @@ -3336,19 +3064,19 @@ type SoftwareSoftwareArtifact struct { Artifact // Provides additional purpose information of the software artifact. - SoftwareAdditionalPurposes []SoftwareSoftwarePurpose + SoftwareAdditionalPurposes []softwareSoftwarePurpose `iri:"https://spdx.org/rdf/3.0.1/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` // Provides a place for the SPDX data creator to record acknowledgement text for // a software Package, File or Snippet. - SoftwareAttributionTexts []string + SoftwareAttributionTexts []string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/attributionText" iri-compact:"software_attributionText"` // A canonical, unique, immutable identifier of the artifact content, that may be // used for verifying its identity and/or integrity. - SoftwareContentIdentifiers SoftwareContentIdentifierList + SoftwareContentIdentifiers SoftwareContentIdentifierList `iri:"https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` // Identifies the text of one or more copyright notices for a software Package, // File or Snippet, if any. - SoftwareCopyrightText string + SoftwareCopyrightText string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/copyrightText" iri-compact:"software_copyrightText"` // Provides information about the primary purpose of the software artifact. - SoftwarePrimaryPurpose SoftwareSoftwarePurpose + SoftwarePrimaryPurpose softwareSoftwarePurpose `iri:"https://spdx.org/rdf/3.0.1/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` } func castSoftwareSoftwareArtifact(o any) *SoftwareSoftwareArtifact { @@ -3369,11 +3097,6 @@ type AnySoftwareSoftwareArtifact interface { type SoftwareSoftwareArtifactList []AnySoftwareSoftwareArtifact -func (o *SoftwareSoftwareArtifactList) Append(values ...AnySoftwareSoftwareArtifact) { - *o = append(*o, values...) -} -func (o *SoftwareSoftwareArtifactList) Remove(value AnySoftwareSoftwareArtifact) { remove(o, value) } - func (o *SoftwareSoftwareArtifactList) SoftwareSoftwareArtifactIter() iter.Seq2[AnySoftwareSoftwareArtifact, *SoftwareSoftwareArtifact] { return typeIter(*o, castSoftwareSoftwareArtifact) } @@ -3417,9 +3140,6 @@ type AnyBom interface { type BomList []AnyBom -func (o *BomList) Append(values ...AnyBom) { *o = append(*o, values...) } -func (o *BomList) Remove(value AnyBom) { remove(o, value) } - func (o *BomList) BomIter() iter.Seq2[AnyBom, *Bom] { return typeIter(*o, castBom) } func (o *BomList) SoftwareSbomIter() iter.Seq2[AnyBom, *SoftwareSbom] { return typeIter(*o, castSoftwareSbom) @@ -3448,13 +3168,6 @@ type AnyExpandedlicensingCustomLicense interface { type ExpandedlicensingCustomLicenseList []AnyExpandedlicensingCustomLicense -func (o *ExpandedlicensingCustomLicenseList) Append(values ...AnyExpandedlicensingCustomLicense) { - *o = append(*o, values...) -} -func (o *ExpandedlicensingCustomLicenseList) Remove(value AnyExpandedlicensingCustomLicense) { - remove(o, value) -} - func (o *ExpandedlicensingCustomLicenseList) ExpandedlicensingCustomLicenseIter() iter.Seq2[AnyExpandedlicensingCustomLicense, *ExpandedlicensingCustomLicense] { return typeIter(*o, castExpandedlicensingCustomLicense) } @@ -3466,10 +3179,10 @@ type SecurityVexAffectedVulnAssessmentRelationship struct { // Provides advise on how to mitigate or remediate a vulnerability when a VEX product // is affected by it. - SecurityActionStatement string + SecurityActionStatement string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/actionStatement" iri-compact:"security_actionStatement"` // Records the time when a recommended action was communicated in a VEX statement // to mitigate a vulnerability. - SecurityActionStatementTime time.Time + SecurityActionStatementTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/actionStatementTime" iri-compact:"security_actionStatementTime"` } func castSecurityVexAffectedVulnAssessmentRelationship(o any) *SecurityVexAffectedVulnAssessmentRelationship { @@ -3490,13 +3203,6 @@ type AnySecurityVexAffectedVulnAssessmentRelationship interface { type SecurityVexAffectedVulnAssessmentRelationshipList []AnySecurityVexAffectedVulnAssessmentRelationship -func (o *SecurityVexAffectedVulnAssessmentRelationshipList) Append(values ...AnySecurityVexAffectedVulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecurityVexAffectedVulnAssessmentRelationshipList) Remove(value AnySecurityVexAffectedVulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecurityVexAffectedVulnAssessmentRelationshipList) SecurityVexAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexAffectedVulnAssessmentRelationship, *SecurityVexAffectedVulnAssessmentRelationship] { return typeIter(*o, castSecurityVexAffectedVulnAssessmentRelationship) } @@ -3525,13 +3231,6 @@ type AnySecurityVexFixedVulnAssessmentRelationship interface { type SecurityVexFixedVulnAssessmentRelationshipList []AnySecurityVexFixedVulnAssessmentRelationship -func (o *SecurityVexFixedVulnAssessmentRelationshipList) Append(values ...AnySecurityVexFixedVulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecurityVexFixedVulnAssessmentRelationshipList) Remove(value AnySecurityVexFixedVulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecurityVexFixedVulnAssessmentRelationshipList) SecurityVexFixedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexFixedVulnAssessmentRelationship, *SecurityVexFixedVulnAssessmentRelationship] { return typeIter(*o, castSecurityVexFixedVulnAssessmentRelationship) } @@ -3544,13 +3243,13 @@ type SecurityVexNotAffectedVulnAssessmentRelationship struct { // Explains why a VEX product is not affected by a vulnerability. It is an // alternative in VexNotAffectedVulnAssessmentRelationship to the machine-readable // justification label. - SecurityImpactStatement string + SecurityImpactStatement string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/impactStatement" iri-compact:"security_impactStatement"` // Timestamp of impact statement. - SecurityImpactStatementTime time.Time + SecurityImpactStatementTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/impactStatementTime" iri-compact:"security_impactStatementTime"` // Impact justification label to be used when linking a vulnerability to an element // representing a VEX product with a VexNotAffectedVulnAssessmentRelationship // relationship. - SecurityJustificationType SecurityVexJustificationType + SecurityJustificationType securityVexJustificationType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/justificationType" iri-compact:"security_justificationType"` } func castSecurityVexNotAffectedVulnAssessmentRelationship(o any) *SecurityVexNotAffectedVulnAssessmentRelationship { @@ -3571,13 +3270,6 @@ type AnySecurityVexNotAffectedVulnAssessmentRelationship interface { type SecurityVexNotAffectedVulnAssessmentRelationshipList []AnySecurityVexNotAffectedVulnAssessmentRelationship -func (o *SecurityVexNotAffectedVulnAssessmentRelationshipList) Append(values ...AnySecurityVexNotAffectedVulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecurityVexNotAffectedVulnAssessmentRelationshipList) Remove(value AnySecurityVexNotAffectedVulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecurityVexNotAffectedVulnAssessmentRelationshipList) SecurityVexNotAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexNotAffectedVulnAssessmentRelationship, *SecurityVexNotAffectedVulnAssessmentRelationship] { return typeIter(*o, castSecurityVexNotAffectedVulnAssessmentRelationship) } @@ -3606,13 +3298,6 @@ type AnySecurityVexUnderInvestigationVulnAssessmentRelationship interface { type SecurityVexUnderInvestigationVulnAssessmentRelationshipList []AnySecurityVexUnderInvestigationVulnAssessmentRelationship -func (o *SecurityVexUnderInvestigationVulnAssessmentRelationshipList) Append(values ...AnySecurityVexUnderInvestigationVulnAssessmentRelationship) { - *o = append(*o, values...) -} -func (o *SecurityVexUnderInvestigationVulnAssessmentRelationshipList) Remove(value AnySecurityVexUnderInvestigationVulnAssessmentRelationship) { - remove(o, value) -} - func (o *SecurityVexUnderInvestigationVulnAssessmentRelationshipList) SecurityVexUnderInvestigationVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexUnderInvestigationVulnAssessmentRelationship, *SecurityVexUnderInvestigationVulnAssessmentRelationship] { return typeIter(*o, castSecurityVexUnderInvestigationVulnAssessmentRelationship) } @@ -3622,9 +3307,9 @@ type SoftwareFile struct { SoftwareSoftwareArtifact // Provides information about the content type of an Element or a Property. - ContentType string + ContentType string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/contentType" iri-compact:"contentType"` // Describes if a given file is a directory or non-directory kind of file. - SoftwareFileKind SoftwareFileKindType + SoftwareFileKind softwareFileKindType `iri:"https://spdx.org/rdf/3.0.1/terms/Software/fileKind" iri-compact:"software_fileKind"` } func castSoftwareFile(o any) *SoftwareFile { @@ -3645,9 +3330,6 @@ type AnySoftwareFile interface { type SoftwareFileList []AnySoftwareFile -func (o *SoftwareFileList) Append(values ...AnySoftwareFile) { *o = append(*o, values...) } -func (o *SoftwareFileList) Remove(value AnySoftwareFile) { remove(o, value) } - func (o *SoftwareFileList) SoftwareFileIter() iter.Seq2[AnySoftwareFile, *SoftwareFile] { return typeIter(*o, castSoftwareFile) } @@ -3659,18 +3341,18 @@ type SoftwarePackage struct { // Identifies the download Uniform Resource Identifier for the package at the time // that the document was created. - SoftwareDownloadLocation string + SoftwareDownloadLocation string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/downloadLocation" iri-compact:"software_downloadLocation"` // A place for the SPDX document creator to record a website that serves as the // package's home page. - SoftwareHomePage string + SoftwareHomePage string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/homePage" iri-compact:"software_homePage"` // Provides a place for the SPDX data creator to record the package URL string // (in accordance with the Package URL specification) for a software Package. - SoftwarePackageUrl string + SoftwarePackageUrl string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/packageUrl" iri-compact:"software_packageUrl"` // Identify the version of a package. - SoftwarePackageVersion string + SoftwarePackageVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/packageVersion" iri-compact:"software_packageVersion"` // Records any relevant background information or additional comments // about the origin of the package. - SoftwareSourceInfo string + SoftwareSourceInfo string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/sourceInfo" iri-compact:"software_sourceInfo"` } func castSoftwarePackage(o any) *SoftwarePackage { @@ -3691,9 +3373,6 @@ type AnySoftwarePackage interface { type SoftwarePackageList []AnySoftwarePackage -func (o *SoftwarePackageList) Append(values ...AnySoftwarePackage) { *o = append(*o, values...) } -func (o *SoftwarePackageList) Remove(value AnySoftwarePackage) { remove(o, value) } - func (o *SoftwarePackageList) SoftwarePackageIter() iter.Seq2[AnySoftwarePackage, *SoftwarePackage] { return typeIter(*o, castSoftwarePackage) } @@ -3709,7 +3388,7 @@ type SoftwareSbom struct { Bom // Provides information about the type of an SBOM. - SoftwareSbomTypes []SoftwareSbomType + SoftwareSbomTypes []softwareSbomType `iri:"https://spdx.org/rdf/3.0.1/terms/Software/sbomType" iri-compact:"software_sbomType"` } func castSoftwareSbom(o any) *SoftwareSbom { @@ -3730,9 +3409,6 @@ type AnySoftwareSbom interface { type SoftwareSbomList []AnySoftwareSbom -func (o *SoftwareSbomList) Append(values ...AnySoftwareSbom) { *o = append(*o, values...) } -func (o *SoftwareSbomList) Remove(value AnySoftwareSbom) { remove(o, value) } - func (o *SoftwareSbomList) SoftwareSbomIter() iter.Seq2[AnySoftwareSbom, *SoftwareSbom] { return typeIter(*o, castSoftwareSbom) } @@ -3743,14 +3419,14 @@ type SoftwareSnippet struct { // Defines the byte range in the original host file that the snippet information // applies to. - SoftwareByteRange AnyPositiveIntegerRange + SoftwareByteRange AnyPositiveIntegerRange `iri:"https://spdx.org/rdf/3.0.1/terms/Software/byteRange" iri-compact:"software_byteRange"` // Defines the line range in the original host file that the snippet information // applies to. - SoftwareLineRange AnyPositiveIntegerRange + SoftwareLineRange AnyPositiveIntegerRange `iri:"https://spdx.org/rdf/3.0.1/terms/Software/lineRange" iri-compact:"software_lineRange"` // Defines the original host file that the snippet information applies to. - SoftwareSnippetFromFile AnySoftwareFile + SoftwareSnippetFromFile AnySoftwareFile `iri:"https://spdx.org/rdf/3.0.1/terms/Software/snippetFromFile" iri-compact:"software_snippetFromFile"` } func castSoftwareSnippet(o any) *SoftwareSnippet { @@ -3771,9 +3447,6 @@ type AnySoftwareSnippet interface { type SoftwareSnippetList []AnySoftwareSnippet -func (o *SoftwareSnippetList) Append(values ...AnySoftwareSnippet) { *o = append(*o, values...) } -func (o *SoftwareSnippetList) Remove(value AnySoftwareSnippet) { remove(o, value) } - func (o *SoftwareSnippetList) SoftwareSnippetIter() iter.Seq2[AnySoftwareSnippet, *SoftwareSnippet] { return typeIter(*o, castSoftwareSnippet) } @@ -3784,44 +3457,44 @@ type AiAIPackage struct { // Indicates whether the system can perform a decision or action without human // involvement or guidance. - AiAutonomyType PresenceType + AiAutonomyType presenceType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/autonomyType" iri-compact:"ai_autonomyType"` // Captures the domain in which the AI package can be used. - AiDomains []string + AiDomains []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/domain" iri-compact:"ai_domain"` // Indicates the amount of energy consumption incurred by an AI model. - AiEnergyConsumption AnyAiEnergyConsumption + AiEnergyConsumption AnyAiEnergyConsumption `iri:"https://spdx.org/rdf/3.0.1/terms/AI/energyConsumption" iri-compact:"ai_energyConsumption"` // Records a hyperparameter used to build the AI model contained in the AI // package. - AiHyperparameters DictionaryEntryList + AiHyperparameters DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/hyperparameter" iri-compact:"ai_hyperparameter"` // Provides relevant information about the AI software, not including the model // description. - AiInformationAboutApplication string + AiInformationAboutApplication string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/informationAboutApplication" iri-compact:"ai_informationAboutApplication"` // Describes relevant information about different steps of the training process. - AiInformationAboutTraining string + AiInformationAboutTraining string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/informationAboutTraining" iri-compact:"ai_informationAboutTraining"` // Captures a limitation of the AI software. - AiLimitation string + AiLimitation string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/limitation" iri-compact:"ai_limitation"` // Records the measurement of prediction quality of the AI model. - AiMetrics DictionaryEntryList + AiMetrics DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/metric" iri-compact:"ai_metric"` // Captures the threshold that was used for computation of a metric described in // the metric field. - AiMetricDecisionThresholds DictionaryEntryList + AiMetricDecisionThresholds DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/metricDecisionThreshold" iri-compact:"ai_metricDecisionThreshold"` // Describes all the preprocessing steps applied to the training data before the // model training. - AiModelDataPreprocessings []string + AiModelDataPreprocessings []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/modelDataPreprocessing" iri-compact:"ai_modelDataPreprocessing"` // Describes methods that can be used to explain the results from the AI model. - AiModelExplainabilitys []string + AiModelExplainabilitys []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/modelExplainability" iri-compact:"ai_modelExplainability"` // Records the results of general safety risk assessment of the AI system. - AiSafetyRiskAssessment AiSafetyRiskAssessmentType + AiSafetyRiskAssessment aiSafetyRiskAssessmentType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/safetyRiskAssessment" iri-compact:"ai_safetyRiskAssessment"` // Captures a standard that is being complied with. - AiStandardCompliances []string + AiStandardCompliances []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/standardCompliance" iri-compact:"ai_standardCompliance"` // Records the type of the model used in the AI software. - AiTypeOfModels []string + AiTypeOfModels []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/typeOfModel" iri-compact:"ai_typeOfModel"` // Records if sensitive personal information is used during model training or // could be used during the inference. - AiUseSensitivePersonalInformation PresenceType + AiUseSensitivePersonalInformation presenceType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/useSensitivePersonalInformation" iri-compact:"ai_useSensitivePersonalInformation"` } func castAiAIPackage(o any) *AiAIPackage { @@ -3842,9 +3515,6 @@ type AnyAiAIPackage interface { type AiAIPackageList []AnyAiAIPackage -func (o *AiAIPackageList) Append(values ...AnyAiAIPackage) { *o = append(*o, values...) } -func (o *AiAIPackageList) Remove(value AnyAiAIPackage) { remove(o, value) } - func (o *AiAIPackageList) AiAIPackageIter() iter.Seq2[AnyAiAIPackage, *AiAIPackage] { return typeIter(*o, castAiAIPackage) } @@ -3854,31 +3524,31 @@ type DatasetDatasetPackage struct { SoftwarePackage // Describes the anonymization methods used. - DatasetAnonymizationMethodUseds []string + DatasetAnonymizationMethodUseds []string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/anonymizationMethodUsed" iri-compact:"dataset_anonymizationMethodUsed"` // Describes the confidentiality level of the data points contained in the dataset. - DatasetConfidentialityLevel DatasetConfidentialityLevelType + DatasetConfidentialityLevel datasetConfidentialityLevelType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/confidentialityLevel" iri-compact:"dataset_confidentialityLevel"` // Describes how the dataset was collected. - DatasetDataCollectionProcess string + DatasetDataCollectionProcess string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/dataCollectionProcess" iri-compact:"dataset_dataCollectionProcess"` // Describes the preprocessing steps that were applied to the raw data to create the given dataset. - DatasetDataPreprocessings []string + DatasetDataPreprocessings []string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/dataPreprocessing" iri-compact:"dataset_dataPreprocessing"` // The field describes the availability of a dataset. - DatasetDatasetAvailability DatasetDatasetAvailabilityType + DatasetDatasetAvailability datasetDatasetAvailabilityType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetAvailability" iri-compact:"dataset_datasetAvailability"` // Describes potentially noisy elements of the dataset. - DatasetDatasetNoise string + DatasetDatasetNoise string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetNoise" iri-compact:"dataset_datasetNoise"` // Captures the size of the dataset. - DatasetDatasetSize int + DatasetDatasetSize int `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetSize" iri-compact:"dataset_datasetSize"` // Describes the type of the given dataset. - DatasetDatasetTypes []DatasetDatasetType + DatasetDatasetTypes []datasetDatasetType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetType" iri-compact:"dataset_datasetType"` // Describes a mechanism to update the dataset. - DatasetDatasetUpdateMechanism string + DatasetDatasetUpdateMechanism string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetUpdateMechanism" iri-compact:"dataset_datasetUpdateMechanism"` // Describes if any sensitive personal information is present in the dataset. - DatasetHasSensitivePersonalInformation PresenceType + DatasetHasSensitivePersonalInformation presenceType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/hasSensitivePersonalInformation" iri-compact:"dataset_hasSensitivePersonalInformation"` // Describes what the given dataset should be used for. - DatasetIntendedUse string + DatasetIntendedUse string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/intendedUse" iri-compact:"dataset_intendedUse"` // Records the biases that the dataset is known to encompass. - DatasetKnownBias []string + DatasetKnownBias []string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/knownBias" iri-compact:"dataset_knownBias"` // Describes a sensor used for collecting the data. - DatasetSensors DictionaryEntryList + DatasetSensors DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/sensor" iri-compact:"dataset_sensor"` } func castDatasetDatasetPackage(o any) *DatasetDatasetPackage { @@ -3899,11 +3569,6 @@ type AnyDatasetDatasetPackage interface { type DatasetDatasetPackageList []AnyDatasetDatasetPackage -func (o *DatasetDatasetPackageList) Append(values ...AnyDatasetDatasetPackage) { - *o = append(*o, values...) -} -func (o *DatasetDatasetPackageList) Remove(value AnyDatasetDatasetPackage) { remove(o, value) } - func (o *DatasetDatasetPackageList) DatasetDatasetPackageIter() iter.Seq2[AnyDatasetDatasetPackage, *DatasetDatasetPackage] { return typeIter(*o, castDatasetDatasetPackage) } @@ -4307,9 +3972,11 @@ func cast[T any](value any) *T { panic("invalid type cast, unknown type: " + reflect.TypeOf(t).String()) } -func As[T any](value any, f func(v *T)) { +func As[T any, R any](value any, f func(v *T) R) R { v := cast[T](value) if v != nil { - f(v) + return f(v) } + var r R + return r } diff --git a/spdx/v3/v3_0/spdx.go b/spdx/v3/v3_0/spdx.go index ea121e61..93fb6741 100644 --- a/spdx/v3/v3_0/spdx.go +++ b/spdx/v3/v3_0/spdx.go @@ -1,8 +1,6 @@ package v3_0 import ( - "fmt" - "math/rand" "reflect" "time" ) @@ -19,11 +17,9 @@ To regenerate, use something like this command: type Document struct { *SpdxDocument - graph []any - //ldc ldContext } -func NewDocument(conformance ProfileIdentifierType, name string, createdBy AnyAgent, createdUsing AnyTool) *Document { +func NewDocument(conformance profileIdentifierType, name string, createdBy AnyAgent, createdUsing AnyTool) *Document { ci := &CreationInfo{ Created: time.Now(), CreatedBys: AgentList{createdBy}, @@ -36,11 +32,10 @@ func NewDocument(conformance ProfileIdentifierType, name string, createdBy AnyAg Name: name, CreationInfo: ci, }, - ProfileConformances: []ProfileIdentifierType{conformance}, + ProfileConformances: []profileIdentifierType{conformance}, }, }, - graph: []any{ci}, - //ldc: ldGlobal, + //LDContext: LDContext(), } } @@ -49,36 +44,13 @@ func (d *Document) Append(e ...AnyElement) { d.SpdxDocument.Elements = append(d.SpdxDocument.Elements, e...) } -//func (d *Document) ToJSON(writer io.Writer) error { -// if d.SpdxDocument == nil { -// return fmt.Errorf("no document object created") -// } -// // all IElement need to have creationInfo set... -// d.setCreationInfo(d.SpdxDocument.CreationInfo, d.SpdxDocument) -// -// // all IElement need to have spdxID... -// if makeIdGenerator != nil { -// idGen := makeIdGenerator(d.SpdxDocument) -// if d.SpdxDocument.ID == "" { -// d.SpdxDocument.ID = idGen(d.SpdxDocument) -// } -// d.ensureSpdxIDs(d.SpdxDocument, idGen) -// } -// -// maps, err := d.ldc.toMaps(d.SpdxDocument) -// if err != nil { -// return err -// } -// enc := json.NewEncoder(writer) -// enc.SetEscapeHTML(false) -// enc.SetIndent("", " ") -// return enc.Encode(maps) -//} - func (d *Document) setCreationInfo(creationInfo AnyCreationInfo, doc *SpdxDocument) { iCreationInfoType := reflect.TypeOf((*AnyCreationInfo)(nil)).Elem() ci := reflect.ValueOf(creationInfo) _ = visitObjectGraph(map[reflect.Value]struct{}{}, reflect.ValueOf(doc), func(v reflect.Value) error { + if v.IsZero() { + return nil + } t := v.Type() if t.Kind() == reflect.Interface && v.IsNil() && t.Implements(iCreationInfoType) { v.Set(ci) @@ -105,20 +77,6 @@ func (d *Document) ensureSpdxIDs(doc *SpdxDocument, idGen idGenerator) { type idGenerator func(e any) string -var makeIdGenerator = func(doc *SpdxDocument) idGenerator { - nextID := map[reflect.Type]uint{} - return func(e any) string { - if _, ok := e.(*SpdxDocument); ok { - return fmt.Sprintf("%v", rand.Uint64()) - } - t := baseType(reflect.TypeOf(e)) - // should these be blank nodes? - id := nextID[t] + 1 - nextID[t] = id - return fmt.Sprintf("_:%v-%v-%v", doc.ID, t.Name(), id) - } -} - func baseType(t reflect.Type) reflect.Type { for t.Kind() == reflect.Ptr { t = t.Elem() @@ -166,18 +124,3 @@ func visitObjectGraph(visited map[reflect.Value]struct{}, v reflect.Value, visit } return nil } - -//func (d *Document) FromJSON(reader io.Reader) error { -// graph, err := d.ldc.FromJSON(reader) -// if err != nil { -// return err -// } -// d.graph = append(d.graph, graph) -// for _, e := range graph { -// if doc, ok := e.(*SpdxDocument); ok { -// d.SpdxDocument = doc -// return nil -// } -// } -// return fmt.Errorf("no document found") -//} diff --git a/spdx/v3/v3_0/spdx_test.go b/spdx/v3/v3_0/spdx_test.go index 808a9617..0f9e70c1 100644 --- a/spdx/v3/v3_0/spdx_test.go +++ b/spdx/v3/v3_0/spdx_test.go @@ -27,7 +27,7 @@ func Test_exportImportExport(t *testing.T) { }}) sbom := &spdx.SoftwareSbom{} - doc.RootElements.Append(sbom) + doc.RootElements = append(doc.RootElements, sbom) // create a package @@ -46,18 +46,18 @@ func Test_exportImportExport(t *testing.T) { // add the packages to the sbom - sbom.RootElements.Append(pkg1, pkg2) + sbom.RootElements = append(sbom.RootElements, pkg1, pkg2) // add a file file1 := &spdx.SoftwareFile{SoftwareSoftwareArtifact: spdx.SoftwareSoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ Name: "/bin/bash", }}}} - sbom.RootElements.Append(file1) + sbom.RootElements = append(sbom.RootElements, file1) // add relationships - sbom.RootElements.Append(&spdx.Relationship{ + sbom.RootElements = append(sbom.RootElements, &spdx.Relationship{ From: file1, RelationshipType: spdx.RelationshipType_Contains, Tos: spdx.ElementList{ @@ -66,7 +66,7 @@ func Test_exportImportExport(t *testing.T) { }, }) - sbom.RootElements.Append(&spdx.Relationship{ + sbom.RootElements = append(sbom.RootElements, &spdx.Relationship{ From: pkg1, RelationshipType: spdx.RelationshipType_DependsOn, Tos: spdx.ElementList{ @@ -74,63 +74,23 @@ func Test_exportImportExport(t *testing.T) { }, }) - // serialize - - //buf := bytes.Buffer{} - //err := doc.ToJSON(&buf) - //if err != nil { - // t.Error(err) - //} - // - //json1 := buf.String() - //fmt.Printf("--------- initial JSON: ----------\n%s\n\n", json1) - // - //// deserialize to a new document - // - //doc = spdx.NewDocument(&spdx.SoftwareAgent{}) - //err = doc.FromJSON(strings.NewReader(json1)) - //if err != nil { - // t.Error(err) - //} - // - //// re-serialize - // - //buf.Reset() - //err = doc.ToJSON(&buf) - //if err != nil { - // t.Error(err) - //} - //json2 := buf.String() - //fmt.Printf("--------- reserialized JSON: ----------\n%s\n", json2) - // - //// compare original to parsed and re-encoded - // - //diff := difflib.UnifiedDiff{ - // A: difflib.SplitLines(json1), - // B: difflib.SplitLines(json2), - // FromFile: "Original", - // ToFile: "Current", - // Context: 3, - //} - //text, _ := difflib.GetUnifiedDiffString(diff) - //if text != "" { - // t.Errorf(text) - //} - // some basic usage: var pkgs []*spdx.SoftwarePackage for _, sbom := range doc.RootElements.SoftwareSbomIter() { for _, rel := range sbom.RootElements.RelationshipIter() { - if rel.RelationshipType == spdx.RelationshipType_Contains { - spdx.As(rel.From, func(f *spdx.SoftwareFile) { - if f.Name == "/bin/bash" { - for _, pkg := range rel.Tos.SoftwarePackageIter() { - pkgs = append(pkgs, pkg) - } - } - }) + if rel.RelationshipType != spdx.RelationshipType_Contains { + continue } + _ = spdx.As(rel.From, func(f *spdx.SoftwareFile) any { + if f.Name == "/bin/bash" { + for _, pkg := range rel.Tos.SoftwarePackageIter() { + pkgs = append(pkgs, pkg) + } + } + return nil + }) + } } if len(pkgs) != 2 { @@ -138,77 +98,8 @@ func Test_exportImportExport(t *testing.T) { } } -func Test_aiProfile(t *testing.T) { - doc := spdx.NewDocument(spdx.ProfileIdentifierType_Ai, "", &spdx.SoftwareAgent{Agent: spdx.Agent{Element: spdx.Element{ - Name: "tools-golang", - Summary: "a summary", - }}}, nil) - - aiPkg := &spdx.AiAIPackage{ - SoftwarePackage: spdx.SoftwarePackage{SoftwareSoftwareArtifact: spdx.SoftwareSoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ - Name: "some ai package", - }}}}, - AiEnergyConsumption: &spdx.AiEnergyConsumption{ - AiFinetuningEnergyConsumptions: spdx.AiEnergyConsumptionDescriptionList{ - &spdx.AiEnergyConsumptionDescription{ - AiEnergyQuantity: 1.2, - AiEnergyUnit: spdx.AiEnergyUnitType_KilowattHour, - }, - }, - AiTrainingEnergyConsumptions: spdx.AiEnergyConsumptionDescriptionList{ - &spdx.AiEnergyConsumptionDescription{ - AiEnergyQuantity: 5032402, - AiEnergyUnit: spdx.AiEnergyUnitType_KilowattHour, - }, - }, - }, - AiTypeOfModels: []string{ - "Llama 3 8B", - }, - } - - doc.RootElements.Append(aiPkg) - - // serialize - - //buf := bytes.Buffer{} - //err := doc.ToJSON(&buf) - //if err != nil { - // t.Error(err) - //} - // - //json1 := buf.String() - //fmt.Printf("--------- initial JSON: ----------\n%s\n\n", json1) - // - //// deserialize to a new document - // - //doc = spdx.NewDocument(&spdx.SoftwareAgent{}) - //err = doc.FromJSON(strings.NewReader(json1)) - //if err != nil { - // t.Error(err) - //} - // - //// re-serialize - // - //buf.Reset() - //err = doc.ToJSON(&buf) - //if err != nil { - // t.Error(err) - //} - //json2 := buf.String() - //fmt.Printf("--------- reserialized JSON: ----------\n%s\n", json2) - // - //// compare original to parsed and re-encoded - // - //diff := difflib.UnifiedDiff{ - // A: difflib.SplitLines(json1), - // B: difflib.SplitLines(json2), - // FromFile: "Original", - // ToFile: "Current", - // Context: 3, - //} - //text, _ := difflib.GetUnifiedDiffString(diff) - //if text != "" { - // t.Errorf(text) - //} +func newTestDocument() *spdx.Document { + return spdx.NewDocument(spdx.ProfileIdentifierType_Lite, "test document", + &spdx.SoftwareAgent{Agent: spdx.Agent{Element: spdx.Element{Name: "tools-golang-tests-agent", Summary: "a summary"}}}, + &spdx.Tool{Element: spdx.Element{Name: "tools-golang-tests-tool"}}) } From 53e1f17b02de9bfadc6ca2b555334dc277a522e3 Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Mon, 10 Mar 2025 01:33:15 -0400 Subject: [PATCH 7/8] feat: mostly functional SPDX 3 model with validation Signed-off-by: Keith Zantow --- go.mod | 7 +- go.sum | 6 + spdx/v3/v3_0/model.go | 6929 ++++++++++++++++++----------- spdx/v3/v3_0/model_validations.go | 878 ++++ spdx/v3/v3_0/spdx.go | 149 +- spdx/v3/v3_0/spdx_test.go | 356 +- spdx/v3/v3_0/util.go | 38 - spdx/v3/v3_0/validator.go | 1846 -------- 8 files changed, 5663 insertions(+), 4546 deletions(-) mode change 100644 => 100755 spdx/v3/v3_0/model.go create mode 100755 spdx/v3/v3_0/model_validations.go delete mode 100644 spdx/v3/v3_0/util.go delete mode 100644 spdx/v3/v3_0/validator.go diff --git a/go.mod b/go.mod index 117238d7..07576e5d 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,17 @@ go 1.23.0 require ( github.com/anchore/go-struct-converter v0.0.0-20240925125616-a0883641c664 + github.com/davecgh/go-spew v1.1.1 github.com/google/go-cmp v0.6.0 + github.com/kzantow/go-ld v0.0.0-20250305231540-23fb13522625 + github.com/pmezard/go-difflib v1.0.0 github.com/spdx/gordf v0.0.0-20250128162952-000978ccd6fb github.com/stretchr/testify v1.10.0 sigs.k8s.io/yaml v1.4.0 ) require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/piprate/json-gold v0.5.1-0.20241210232033-19254b3ec65b // indirect + github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index ee460074..235de752 100644 --- a/go.sum +++ b/go.sum @@ -5,8 +5,14 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/kzantow/go-ld v0.0.0-20250305231540-23fb13522625 h1:xFbgOwCtZx5bu7Ggnn1eHhPyjIG2vtQgpio5zH6onUU= +github.com/kzantow/go-ld v0.0.0-20250305231540-23fb13522625/go.mod h1:P7HdHSjYOcim2o9GWUj011qCd9bEOc+Bg8SeW6JKV8M= +github.com/piprate/json-gold v0.5.1-0.20241210232033-19254b3ec65b h1:xyh6boGzDR4EpdEDe9ix1KhHNgOSiBjBocahA6FalEQ= +github.com/piprate/json-gold v0.5.1-0.20241210232033-19254b3ec65b/go.mod h1:RVhE35veDX19r5gfUAR+IYHkAUuPwJO8Ie/qVeFaIzw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= +github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/spdx/gordf v0.0.0-20250128162952-000978ccd6fb h1:7G2Czq97VORM5xNRrD8tSQdhoXPRs8s+Otlc7st9TS0= github.com/spdx/gordf v0.0.0-20250128162952-000978ccd6fb/go.mod h1:uKWaldnbMnjsSAXRurWqqrdyZen1R7kxl8TkmWk2OyM= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= diff --git a/spdx/v3/v3_0/model.go b/spdx/v3/v3_0/model.go old mode 100644 new mode 100755 index 9a9c4796..a306446c --- a/spdx/v3/v3_0/model.go +++ b/spdx/v3/v3_0/model.go @@ -1,3982 +1,5763 @@ -// This file was automatically generated by __main__.py. DO NOT MANUALLY MODIFY IT +// Generated by github.com/kzantow/go-ld // -// SPDX-License-Identifier: 0BSD +// SPDX-License-Identifier: MIT package v3_0 import ( - "iter" "reflect" "time" + + "github.com/kzantow/go-ld" ) -// A class for describing the energy consumption incurred by an AI model in -// different stages of its lifecycle. -type AiEnergyConsumption struct { - ID string `iri:"@id"` +type AnyAIPackage interface { + asAIPackage() *AIPackage +} + +// AIPackage Specifies an AI package and its associated information. +type AIPackage struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/AI/AIPackage"` + Package + // Domains Captures the domain in which the AI package can be used. + Domains []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/domain" type:"http://www.w3.org/2001/XMLSchema#string"` + // EnergyConsumption Indicates the amount of energy consumption incurred by an AI model. + EnergyConsumption AnyEnergyConsumption `iri:"https://spdx.org/rdf/3.0.1/terms/AI/energyConsumption" type:"https://spdx.org/rdf/3.0.1/terms/AI/EnergyConsumption"` + // ModelDataPreprocessings Describes all the preprocessing steps applied to the training data before the\nmodel training. + ModelDataPreprocessings []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/modelDataPreprocessing" type:"http://www.w3.org/2001/XMLSchema#string"` + // UseSensitivePersonalInformation Records if sensitive personal information is used during model training or\ncould be used during the inference. + UseSensitivePersonalInformation PresenceType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/useSensitivePersonalInformation" type:"https://spdx.org/rdf/3.0.1/terms/Core/PresenceType"` + // AutonomyType Indicates whether the system can perform a decision or action without human\ninvolvement or guidance. + AutonomyType PresenceType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/autonomyType" type:"https://spdx.org/rdf/3.0.1/terms/Core/PresenceType"` + // SafetyRiskAssessment Records the results of general safety risk assessment of the AI system. + SafetyRiskAssessment SafetyRiskAssessmentType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/safetyRiskAssessment" type:"https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType"` + // Hyperparameters Records a hyperparameter used to build the AI model contained in the AI\npackage. + Hyperparameters DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/hyperparameter" type:"https://spdx.org/rdf/3.0.1/terms/Core/DictionaryEntry"` + // Limitation Captures a limitation of the AI software. + Limitation string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/limitation" type:"http://www.w3.org/2001/XMLSchema#string"` + // ModelExplainabilities Describes methods that can be used to explain the results from the AI model. + ModelExplainabilities []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/modelExplainability" type:"http://www.w3.org/2001/XMLSchema#string"` + // StandardCompliances Captures a standard that is being complied with. + StandardCompliances []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/standardCompliance" type:"http://www.w3.org/2001/XMLSchema#string"` + // MetricDecisionThresholds Captures the threshold that was used for computation of a metric described in\nthe metric field. + MetricDecisionThresholds DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/metricDecisionThreshold" type:"https://spdx.org/rdf/3.0.1/terms/Core/DictionaryEntry"` + // TypeOfModels Records the type of the model used in the AI software. + TypeOfModels []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/typeOfModel" type:"http://www.w3.org/2001/XMLSchema#string"` + // InformationAboutApplication Provides relevant information about the AI software, not including the model\ndescription. + InformationAboutApplication string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/informationAboutApplication" type:"http://www.w3.org/2001/XMLSchema#string"` + // InformationAboutTraining Describes relevant information about different steps of the training process. + InformationAboutTraining string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/informationAboutTraining" type:"http://www.w3.org/2001/XMLSchema#string"` + // Metrics Records the measurement of prediction quality of the AI model. + Metrics DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/metric" type:"https://spdx.org/rdf/3.0.1/terms/Core/DictionaryEntry"` +} + +func (o *AIPackage) asAIPackage() *AIPackage { + return o +} - // Specifies the amount of energy consumed when finetuning the AI model that is - // being used in the AI system. - AiFinetuningEnergyConsumptions AiEnergyConsumptionDescriptionList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/finetuningEnergyConsumption" iri-compact:"ai_finetuningEnergyConsumption"` +type AIPackageList []AnyAIPackage - // Specifies the amount of energy consumed during inference time by an AI model - // that is being used in the AI system. - AiInferenceEnergyConsumptions AiEnergyConsumptionDescriptionList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/inferenceEnergyConsumption" iri-compact:"ai_inferenceEnergyConsumption"` +func (o *AIPackageList) AIPackages() ld.TypeSeq[AnyAIPackage, *AIPackage] { + return ld.NewTypeSeq(*o, castAIPackage) +} - // Specifies the amount of energy consumed when training the AI model that is - // being used in the AI system. - AiTrainingEnergyConsumptions AiEnergyConsumptionDescriptionList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/trainingEnergyConsumption" iri-compact:"ai_trainingEnergyConsumption"` +type AnyAgent interface { + asAgent() *Agent } -func castAiEnergyConsumption(o any) *AiEnergyConsumption { - if o, ok := o.(AnyAiEnergyConsumption); ok { - return o.asAiEnergyConsumption() - } - return nil +// Agent represents anything with the potential to act on a system. +type Agent struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/Agent"` + Element } -func (o *AiEnergyConsumption) asAiEnergyConsumption() *AiEnergyConsumption { +func (o *Agent) asAgent() *Agent { return o } -type AnyAiEnergyConsumption interface { - asAiEnergyConsumption() *AiEnergyConsumption -} +type AgentList []AnyAgent -type AiEnergyConsumptionList []AnyAiEnergyConsumption +func (o *AgentList) Agents() ld.TypeSeq[AnyAgent, *Agent] { + return ld.NewTypeSeq(*o, castAgent) +} -func (o *AiEnergyConsumptionList) AiEnergyConsumptionIter() iter.Seq2[AnyAiEnergyConsumption, *AiEnergyConsumption] { - return typeIter(*o, castAiEnergyConsumption) +func (o *AgentList) Organizations() ld.TypeSeq[AnyAgent, *Organization] { + return ld.NewTypeSeq(*o, castOrganization) } -// The class that helps note down the quantity of energy consumption and the unit -// used for measurement. -type AiEnergyConsumptionDescription struct { - ID string `iri:"@id"` +func (o *AgentList) People() ld.TypeSeq[AnyAgent, *Person] { + return ld.NewTypeSeq(*o, castPerson) +} - // Represents the energy quantity. - AiEnergyQuantity float64 `iri:"https://spdx.org/rdf/3.0.1/terms/AI/energyQuantity" iri-compact:"ai_energyQuantity"` - // Specifies the unit in which energy is measured. - AiEnergyUnit aiEnergyUnitType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/energyUnit" iri-compact:"ai_energyUnit"` +func (o *AgentList) SoftwareAgents() ld.TypeSeq[AnyAgent, *SoftwareAgent] { + return ld.NewTypeSeq(*o, castSoftwareAgent) } -func castAiEnergyConsumptionDescription(o any) *AiEnergyConsumptionDescription { - if o, ok := o.(AnyAiEnergyConsumptionDescription); ok { - return o.asAiEnergyConsumptionDescription() - } - return nil +type AnyAnnotation interface { + asAnnotation() *Annotation } -func (o *AiEnergyConsumptionDescription) asAiEnergyConsumptionDescription() *AiEnergyConsumptionDescription { - return o +// Annotation An assertion made in relation to one or more elements. +type Annotation struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/Annotation"` + Element + // Subject An Element an annotator has made an assertion about. + Subject AnyElement `iri:"https://spdx.org/rdf/3.0.1/terms/Core/subject" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Core/Element"` + // ContentType Provides information about the content type of an Element or a Property. + ContentType string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/contentType" type:"http://www.w3.org/2001/XMLSchema#string"` + // Statement Commentary on an assertion that an annotator has made. + Statement string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/statement" type:"http://www.w3.org/2001/XMLSchema#string"` + // AnnotationType Describes the type of annotation. + AnnotationType AnnotationType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/annotationType" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType"` } -type AnyAiEnergyConsumptionDescription interface { - asAiEnergyConsumptionDescription() *AiEnergyConsumptionDescription +func (o *Annotation) asAnnotation() *Annotation { + return o } -type AiEnergyConsumptionDescriptionList []AnyAiEnergyConsumptionDescription +type AnnotationList []AnyAnnotation -func (o *AiEnergyConsumptionDescriptionList) AiEnergyConsumptionDescriptionIter() iter.Seq2[AnyAiEnergyConsumptionDescription, *AiEnergyConsumptionDescription] { - return typeIter(*o, castAiEnergyConsumptionDescription) +func (o *AnnotationList) Annotations() ld.TypeSeq[AnyAnnotation, *Annotation] { + return ld.NewTypeSeq(*o, castAnnotation) } -// Specifies the unit of energy consumption. -type aiEnergyUnitType struct { - ID string `iri:"@id"` +// AnnotationType Specifies the type of an annotation. +type AnnotationType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType"` + id string `iri:"@id"` } -// Kilowatt-hour. -var AiEnergyUnitType_KilowattHour = aiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/kilowattHour"} - -// Megajoule. -var AiEnergyUnitType_Megajoule = aiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/megajoule"} +// AnnotationType_Other Used to store extra information about an Element which is not part of a review (e.g. extra information provided during the creation of the Element). +var AnnotationType_Other = AnnotationType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType/other", +} -// Any other units of energy measurement. -var AiEnergyUnitType_Other = aiEnergyUnitType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/other"} +// AnnotationType_Review Used when someone reviews the Element. +var AnnotationType_Review = AnnotationType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType/review", +} -// Specifies the safety risk level. -type aiSafetyRiskAssessmentType struct { - ID string `iri:"@id"` +type AnyArtifact interface { + asArtifact() *Artifact } -// The second-highest level of risk posed by an AI system. -var AiSafetyRiskAssessmentType_High = aiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/high"} +// Artifact A distinct article or unit within the digital domain. +type Artifact struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/Artifact"` + Element + // StandardNames The name of a relevant standard that may apply to an artifact. + StandardNames []string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/standardName" type:"http://www.w3.org/2001/XMLSchema#string"` + // BuiltTime Specifies the time an artifact was built. + BuiltTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/builtTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` + // ReleaseTime Specifies the time an artifact was released. + ReleaseTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/releaseTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` + // SupportLevels Specifies the level of support associated with an artifact. + SupportLevels []SupportType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/supportLevel" type:"https://spdx.org/rdf/3.0.1/terms/Core/SupportType"` + // SuppliedBy Identifies who or what supplied the artifact or VulnAssessmentRelationship\nreferenced by the Element. + SuppliedBy AnyAgent `iri:"https://spdx.org/rdf/3.0.1/terms/Core/suppliedBy" type:"https://spdx.org/rdf/3.0.1/terms/Core/Agent"` + // OriginatedBy Identifies from where or whom the Element originally came. + OriginatedBy AgentList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/originatedBy" type:"https://spdx.org/rdf/3.0.1/terms/Core/Agent"` + // ValidUntilTime Specifies until when the artifact can be used before its usage needs to be\nreassessed. + ValidUntilTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/validUntilTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` +} -// Low/no risk is posed by an AI system. -var AiSafetyRiskAssessmentType_Low = aiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/low"} +func (o *Artifact) asArtifact() *Artifact { + return o +} -// The third-highest level of risk posed by an AI system. -var AiSafetyRiskAssessmentType_Medium = aiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/medium"} +type ArtifactList []AnyArtifact -// The highest level of risk posed by an AI system. -var AiSafetyRiskAssessmentType_Serious = aiSafetyRiskAssessmentType{ID: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/serious"} +func (o *ArtifactList) AIPackages() ld.TypeSeq[AnyArtifact, *AIPackage] { + return ld.NewTypeSeq(*o, castAIPackage) +} -// Specifies the type of an annotation. -type annotationType struct { - ID string `iri:"@id"` +func (o *ArtifactList) Artifacts() ld.TypeSeq[AnyArtifact, *Artifact] { + return ld.NewTypeSeq(*o, castArtifact) } -// Used to store extra information about an Element which is not part of a review (e.g. extra information provided during the creation of the Element). -var AnnotationType_Other = annotationType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType/other"} +func (o *ArtifactList) DatasetPackages() ld.TypeSeq[AnyArtifact, *DatasetPackage] { + return ld.NewTypeSeq(*o, castDatasetPackage) +} -// Used when someone reviews the Element. -var AnnotationType_Review = annotationType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType/review"} +func (o *ArtifactList) Files() ld.TypeSeq[AnyArtifact, *File] { + return ld.NewTypeSeq(*o, castFile) +} -// Provides information about the creation of the Element. -type CreationInfo struct { - ID string `iri:"@id"` +func (o *ArtifactList) Packages() ld.TypeSeq[AnyArtifact, *Package] { + return ld.NewTypeSeq(*o, castPackage) +} - // Provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" iri-compact:"comment"` - // Identifies when the Element was originally created. - Created time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/created" iri-compact:"created"` - // Identifies who or what created the Element. - CreatedBys AgentList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/createdBy" iri-compact:"createdBy"` +func (o *ArtifactList) Snippets() ld.TypeSeq[AnyArtifact, *Snippet] { + return ld.NewTypeSeq(*o, castSnippet) +} - // Identifies the tooling that was used during the creation of the Element. - CreatedUsings ToolList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/createdUsing" iri-compact:"createdUsing"` +func (o *ArtifactList) SoftwareArtifacts() ld.TypeSeq[AnyArtifact, *SoftwareArtifact] { + return ld.NewTypeSeq(*o, castSoftwareArtifact) +} - // Provides a reference number that can be used to understand how to parse and - // interpret an Element. - SpecVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/specVersion" iri-compact:"specVersion"` +func (o *ArtifactList) Vulnerabilities() ld.TypeSeq[AnyArtifact, *Vulnerability] { + return ld.NewTypeSeq(*o, castVulnerability) } -func castCreationInfo(o any) *CreationInfo { - if o, ok := o.(AnyCreationInfo); ok { - return o.asCreationInfo() - } - return nil +type AnyBom interface { + asBom() *Bom } -func (o *CreationInfo) asCreationInfo() *CreationInfo { - return o +// Bom A container for a grouping of SPDX-3.0 content characterizing details\n(provenence, composition, licensing, etc.) about a product. +type Bom struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/Bom"` + Bundle } -type AnyCreationInfo interface { - asCreationInfo() *CreationInfo +func (o *Bom) asBom() *Bom { + return o } -type CreationInfoList []AnyCreationInfo +type BomList []AnyBom -func (o *CreationInfoList) CreationInfoIter() iter.Seq2[AnyCreationInfo, *CreationInfo] { - return typeIter(*o, castCreationInfo) +func (o *BomList) Boms() ld.TypeSeq[AnyBom, *Bom] { + return ld.NewTypeSeq(*o, castBom) } -// A key with an associated value. -type DictionaryEntry struct { - ID string `iri:"@id"` - - // A key used in a generic key-value pair. - Key string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/key" iri-compact:"key"` - // A value used in a generic key-value pair. - Value string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/value" iri-compact:"value"` +func (o *BomList) Sboms() ld.TypeSeq[AnyBom, *Sbom] { + return ld.NewTypeSeq(*o, castSbom) } -func castDictionaryEntry(o any) *DictionaryEntry { - if o, ok := o.(AnyDictionaryEntry); ok { - return o.asDictionaryEntry() - } - return nil +type AnyBuild interface { + asBuild() *Build } -func (o *DictionaryEntry) asDictionaryEntry() *DictionaryEntry { +// Build Class that describes a build instance of software/artifacts. +type Build struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Build/Build"` + Element + // BuildId A buildId is a locally unique identifier used by a builder to identify a unique\ninstance of a build produced by it. + BuildId string `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildId" type:"http://www.w3.org/2001/XMLSchema#string"` + // ConfigSourceUris Property that describes the URI of the build configuration source file. + ConfigSourceUris []ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Build/configSourceUri" type:"http://www.w3.org/2001/XMLSchema#anyURI"` + // BuildStartTime Property describing the start time of a build. + BuildStartTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildStartTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` + // ConfigSourceDigests Property that describes the digest of the build configuration file used to\ninvoke a build. + ConfigSourceDigests HashList `iri:"https://spdx.org/rdf/3.0.1/terms/Build/configSourceDigest" type:"https://spdx.org/rdf/3.0.1/terms/Core/Hash"` + // Parameters Property describing a parameter used in an instance of a build. + Parameters DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Build/parameter" type:"https://spdx.org/rdf/3.0.1/terms/Core/DictionaryEntry"` + // BuildType A buildType is a hint that is used to indicate the toolchain, platform, or\ninfrastructure that the build was invoked on. + BuildType ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildType" required:"true" type:"http://www.w3.org/2001/XMLSchema#anyURI"` + // ConfigSourceEntrypoints Property describes the invocation entrypoint of a build. + ConfigSourceEntrypoints []string `iri:"https://spdx.org/rdf/3.0.1/terms/Build/configSourceEntrypoint" type:"http://www.w3.org/2001/XMLSchema#string"` + // BuildEndTime Property that describes the time at which a build stops. + BuildEndTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildEndTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` + // Environments Property describing the session in which a build is invoked. + Environments DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Build/environment" type:"https://spdx.org/rdf/3.0.1/terms/Core/DictionaryEntry"` +} + +func (o *Build) asBuild() *Build { return o } -type AnyDictionaryEntry interface { - asDictionaryEntry() *DictionaryEntry -} +type BuildList []AnyBuild -type DictionaryEntryList []AnyDictionaryEntry +func (o *BuildList) Builds() ld.TypeSeq[AnyBuild, *Build] { + return ld.NewTypeSeq(*o, castBuild) +} -func (o *DictionaryEntryList) DictionaryEntryIter() iter.Seq2[AnyDictionaryEntry, *DictionaryEntry] { - return typeIter(*o, castDictionaryEntry) +type AnyBundle interface { + asBundle() *Bundle } -// Base domain class from which all other SPDX-3.0 domain classes derive. -type Element struct { - ID string `iri:"@id" iri-compact:"spdxId"` +// Bundle A collection of Elements that have a shared context. +type Bundle struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/Bundle"` + ElementCollection + // Context Gives information about the circumstances or unifying properties\nthat Elements of the bundle have been assembled under. + Context string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/context" type:"http://www.w3.org/2001/XMLSchema#string"` +} - // Provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" iri-compact:"comment"` - // Provides information about the creation of the Element. - CreationInfo AnyCreationInfo `iri:"https://spdx.org/rdf/3.0.1/terms/Core/creationInfo" iri-compact:"creationInfo"` +func (o *Bundle) asBundle() *Bundle { + return o +} - // Provides a detailed description of the Element. - Description string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/description" iri-compact:"description"` - // Specifies an Extension characterization of some aspect of an Element. - Extensions ExtensionExtensionList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/extension" iri-compact:"extension"` +type BundleList []AnyBundle - // Provides a reference to a resource outside the scope of SPDX-3.0 content - // that uniquely identifies an Element. - ExternalIdentifiers ExternalIdentifierList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalIdentifier" iri-compact:"externalIdentifier"` +func (o *BundleList) Boms() ld.TypeSeq[AnyBundle, *Bom] { + return ld.NewTypeSeq(*o, castBom) +} - // Points to a resource outside the scope of the SPDX-3.0 content - // that provides additional characteristics of an Element. - ExternalRefs ExternalRefList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalRef" iri-compact:"externalRef"` +func (o *BundleList) Bundles() ld.TypeSeq[AnyBundle, *Bundle] { + return ld.NewTypeSeq(*o, castBundle) +} - // Identifies the name of an Element as designated by the creator. - Name string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/name" iri-compact:"name"` - // A short description of an Element. - Summary string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/summary" iri-compact:"summary"` - // Provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsings IntegrityMethodList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +func (o *BundleList) Sboms() ld.TypeSeq[AnyBundle, *Sbom] { + return ld.NewTypeSeq(*o, castSbom) } -func castElement(o any) *Element { - if o, ok := o.(AnyElement); ok { - return o.asElement() - } - return nil +type AnyCdxPropertiesExtension interface { + asCdxPropertiesExtension() *CdxPropertiesExtension } -func (o *Element) asElement() *Element { - return o +// CdxPropertiesExtension A type of extension consisting of a list of name value pairs. +type CdxPropertiesExtension struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/CdxPropertiesExtension"` + Extension + // CdxProperties Provides a map of a property names to a values. + CdxProperties CdxPropertyEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/cdxProperty" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Extension/CdxPropertyEntry"` } -type AnyElement interface { - asElement() *Element +func (o *CdxPropertiesExtension) asCdxPropertiesExtension() *CdxPropertiesExtension { + return o } -type ElementList []AnyElement +type CdxPropertiesExtensionList []AnyCdxPropertiesExtension -func (o *ElementList) ElementIter() iter.Seq2[AnyElement, *Element] { return typeIter(*o, castElement) } -func (o *ElementList) ElementCollectionIter() iter.Seq2[AnyElement, *ElementCollection] { - return typeIter(*o, castElementCollection) -} -func (o *ElementList) IndividualElementIter() iter.Seq2[AnyElement, *IndividualElement] { - return typeIter(*o, castIndividualElement) -} -func (o *ElementList) RelationshipIter() iter.Seq2[AnyElement, *Relationship] { - return typeIter(*o, castRelationship) -} -func (o *ElementList) SpdxDocumentIter() iter.Seq2[AnyElement, *SpdxDocument] { - return typeIter(*o, castSpdxDocument) -} -func (o *ElementList) ToolIter() iter.Seq2[AnyElement, *Tool] { return typeIter(*o, castTool) } -func (o *ElementList) ExpandedlicensingLicenseAdditionIter() iter.Seq2[AnyElement, *ExpandedlicensingLicenseAddition] { - return typeIter(*o, castExpandedlicensingLicenseAddition) -} -func (o *ElementList) ExpandedlicensingListedLicenseExceptionIter() iter.Seq2[AnyElement, *ExpandedlicensingListedLicenseException] { - return typeIter(*o, castExpandedlicensingListedLicenseException) -} -func (o *ElementList) SecurityVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVulnAssessmentRelationship) -} -func (o *ElementList) SimplelicensingAnyLicenseInfoIter() iter.Seq2[AnyElement, *SimplelicensingAnyLicenseInfo] { - return typeIter(*o, castSimplelicensingAnyLicenseInfo) +func (o *CdxPropertiesExtensionList) CdxPropertiesExtensions() ld.TypeSeq[AnyCdxPropertiesExtension, *CdxPropertiesExtension] { + return ld.NewTypeSeq(*o, castCdxPropertiesExtension) } -func (o *ElementList) SimplelicensingLicenseExpressionIter() iter.Seq2[AnyElement, *SimplelicensingLicenseExpression] { - return typeIter(*o, castSimplelicensingLicenseExpression) -} -func (o *ElementList) SimplelicensingSimpleLicensingTextIter() iter.Seq2[AnyElement, *SimplelicensingSimpleLicensingText] { - return typeIter(*o, castSimplelicensingSimpleLicensingText) -} -func (o *ElementList) BuildBuildIter() iter.Seq2[AnyElement, *BuildBuild] { - return typeIter(*o, castBuildBuild) -} -func (o *ElementList) AgentIter() iter.Seq2[AnyElement, *Agent] { return typeIter(*o, castAgent) } -func (o *ElementList) AnnotationIter() iter.Seq2[AnyElement, *Annotation] { - return typeIter(*o, castAnnotation) -} -func (o *ElementList) ArtifactIter() iter.Seq2[AnyElement, *Artifact] { - return typeIter(*o, castArtifact) -} -func (o *ElementList) BundleIter() iter.Seq2[AnyElement, *Bundle] { return typeIter(*o, castBundle) } -func (o *ElementList) LifecycleScopedRelationshipIter() iter.Seq2[AnyElement, *LifecycleScopedRelationship] { - return typeIter(*o, castLifecycleScopedRelationship) -} -func (o *ElementList) OrganizationIter() iter.Seq2[AnyElement, *Organization] { - return typeIter(*o, castOrganization) -} -func (o *ElementList) PersonIter() iter.Seq2[AnyElement, *Person] { return typeIter(*o, castPerson) } -func (o *ElementList) SoftwareAgentIter() iter.Seq2[AnyElement, *SoftwareAgent] { - return typeIter(*o, castSoftwareAgent) -} -func (o *ElementList) ExpandedlicensingConjunctiveLicenseSetIter() iter.Seq2[AnyElement, *ExpandedlicensingConjunctiveLicenseSet] { - return typeIter(*o, castExpandedlicensingConjunctiveLicenseSet) -} -func (o *ElementList) ExpandedlicensingCustomLicenseAdditionIter() iter.Seq2[AnyElement, *ExpandedlicensingCustomLicenseAddition] { - return typeIter(*o, castExpandedlicensingCustomLicenseAddition) -} -func (o *ElementList) ExpandedlicensingDisjunctiveLicenseSetIter() iter.Seq2[AnyElement, *ExpandedlicensingDisjunctiveLicenseSet] { - return typeIter(*o, castExpandedlicensingDisjunctiveLicenseSet) + +type AnyCdxPropertyEntry interface { + asCdxPropertyEntry() *CdxPropertyEntry } -func (o *ElementList) ExpandedlicensingExtendableLicenseIter() iter.Seq2[AnyElement, *ExpandedlicensingExtendableLicense] { - return typeIter(*o, castExpandedlicensingExtendableLicense) + +// CdxPropertyEntry A property name with an associated value. +type CdxPropertyEntry struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/CdxPropertyEntry"` + ID string `iri:"@id"` + // CdxPropValue A value used in a CdxPropertyEntry name-value pair. + CdxPropValue string `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/cdxPropValue" type:"http://www.w3.org/2001/XMLSchema#string"` + // CdxPropName A name used in a CdxPropertyEntry name-value pair. + CdxPropName string `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/cdxPropName" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` } -func (o *ElementList) ExpandedlicensingIndividualLicensingInfoIter() iter.Seq2[AnyElement, *ExpandedlicensingIndividualLicensingInfo] { - return typeIter(*o, castExpandedlicensingIndividualLicensingInfo) + +func (o *CdxPropertyEntry) asCdxPropertyEntry() *CdxPropertyEntry { + return o } -func (o *ElementList) ExpandedlicensingLicenseIter() iter.Seq2[AnyElement, *ExpandedlicensingLicense] { - return typeIter(*o, castExpandedlicensingLicense) + +type CdxPropertyEntryList []AnyCdxPropertyEntry + +func (o *CdxPropertyEntryList) CdxPropertyEntries() ld.TypeSeq[AnyCdxPropertyEntry, *CdxPropertyEntry] { + return ld.NewTypeSeq(*o, castCdxPropertyEntry) } -func (o *ElementList) ExpandedlicensingListedLicenseIter() iter.Seq2[AnyElement, *ExpandedlicensingListedLicense] { - return typeIter(*o, castExpandedlicensingListedLicense) + +// ConfidentialityLevelType Categories of confidentiality level. +type ConfidentialityLevelType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType"` + id string `iri:"@id"` } -func (o *ElementList) ExpandedlicensingOrLaterOperatorIter() iter.Seq2[AnyElement, *ExpandedlicensingOrLaterOperator] { - return typeIter(*o, castExpandedlicensingOrLaterOperator) + +// ConfidentialityLevelType_Amber Data points in the dataset can be shared only with specific organizations and their clients on a need to know basis. +var ConfidentialityLevelType_Amber = ConfidentialityLevelType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/amber", } -func (o *ElementList) ExpandedlicensingWithAdditionOperatorIter() iter.Seq2[AnyElement, *ExpandedlicensingWithAdditionOperator] { - return typeIter(*o, castExpandedlicensingWithAdditionOperator) + +// ConfidentialityLevelType_Clear Dataset may be distributed freely, without restriction. +var ConfidentialityLevelType_Clear = ConfidentialityLevelType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/clear", } -func (o *ElementList) SecurityCvssV2VulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityCvssV2VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV2VulnAssessmentRelationship) + +// ConfidentialityLevelType_Green Dataset can be shared within a community of peers and partners. +var ConfidentialityLevelType_Green = ConfidentialityLevelType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/green", } -func (o *ElementList) SecurityCvssV3VulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityCvssV3VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV3VulnAssessmentRelationship) + +// ConfidentialityLevelType_Red Data points in the dataset are highly confidential and can only be shared with named recipients. +var ConfidentialityLevelType_Red = ConfidentialityLevelType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/red", } -func (o *ElementList) SecurityCvssV4VulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityCvssV4VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV4VulnAssessmentRelationship) + +type AnyConjunctiveLicenseSet interface { + asConjunctiveLicenseSet() *ConjunctiveLicenseSet } -func (o *ElementList) SecurityEpssVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityEpssVulnAssessmentRelationship] { - return typeIter(*o, castSecurityEpssVulnAssessmentRelationship) + +// ConjunctiveLicenseSet Portion of an AnyLicenseInfo representing a set of licensing information\nwhere all elements apply. +type ConjunctiveLicenseSet struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/ConjunctiveLicenseSet"` + LicenseInfo + // Members A license expression participating in a license set. + Members LicenseInfoList `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/member" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/AnyLicenseInfo"` } -func (o *ElementList) SecurityExploitCatalogVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityExploitCatalogVulnAssessmentRelationship] { - return typeIter(*o, castSecurityExploitCatalogVulnAssessmentRelationship) + +func (o *ConjunctiveLicenseSet) asConjunctiveLicenseSet() *ConjunctiveLicenseSet { + return o } -func (o *ElementList) SecuritySsvcVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecuritySsvcVulnAssessmentRelationship] { - return typeIter(*o, castSecuritySsvcVulnAssessmentRelationship) + +type ConjunctiveLicenseSetList []AnyConjunctiveLicenseSet + +func (o *ConjunctiveLicenseSetList) ConjunctiveLicenseSets() ld.TypeSeq[AnyConjunctiveLicenseSet, *ConjunctiveLicenseSet] { + return ld.NewTypeSeq(*o, castConjunctiveLicenseSet) } -func (o *ElementList) SecurityVexVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVexVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexVulnAssessmentRelationship) + +type AnyContentIdentifier interface { + asContentIdentifier() *ContentIdentifier } -func (o *ElementList) SecurityVulnerabilityIter() iter.Seq2[AnyElement, *SecurityVulnerability] { - return typeIter(*o, castSecurityVulnerability) + +// ContentIdentifier A canonical, unique, immutable identifier +type ContentIdentifier struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifier"` + IntegrityMethod + // ContentIdentifierType Specifies the type of the content identifier. + ContentIdentifierType ContentIdentifierType `iri:"https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifierType" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType"` + // ContentIdentifierValue Specifies the value of the content identifier. + ContentIdentifierValue ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifierValue" required:"true" type:"http://www.w3.org/2001/XMLSchema#anyURI"` } -func (o *ElementList) SoftwareSoftwareArtifactIter() iter.Seq2[AnyElement, *SoftwareSoftwareArtifact] { - return typeIter(*o, castSoftwareSoftwareArtifact) + +func (o *ContentIdentifier) asContentIdentifier() *ContentIdentifier { + return o } -func (o *ElementList) BomIter() iter.Seq2[AnyElement, *Bom] { return typeIter(*o, castBom) } -func (o *ElementList) ExpandedlicensingCustomLicenseIter() iter.Seq2[AnyElement, *ExpandedlicensingCustomLicense] { - return typeIter(*o, castExpandedlicensingCustomLicense) + +type ContentIdentifierList []AnyContentIdentifier + +func (o *ContentIdentifierList) ContentIdentifiers() ld.TypeSeq[AnyContentIdentifier, *ContentIdentifier] { + return ld.NewTypeSeq(*o, castContentIdentifier) } -func (o *ElementList) SecurityVexAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVexAffectedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexAffectedVulnAssessmentRelationship) + +// ContentIdentifierType Specifies the type of a content identifier. +type ContentIdentifierType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType"` + id string `iri:"@id"` } -func (o *ElementList) SecurityVexFixedVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVexFixedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexFixedVulnAssessmentRelationship) + +// ContentIdentifierType_Gitoid [Gitoid](https://www.iana.org/assignments/uri-schemes/prov/gitoid), stands for [Git Object ID](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). A gitoid of type blob is a unique hash of a binary artifact. A gitoid may represent either an [Artifact Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-identifier-types) for the software artifact or an [Input Manifest Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#input-manifest-identifier) for the software artifact's associated [Artifact Input Manifest](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-input-manifest); this ambiguity exists because the Artifact Input Manifest is itself an artifact, and the gitoid of that artifact is its valid identifier. Gitoids calculated on software artifacts (Snippet, File, or Package Elements) should be recorded in the SPDX 3.0 SoftwareArtifact's contentIdentifier property. Gitoids calculated on the Artifact Input Manifest (Input Manifest Identifier) should be recorded in the SPDX 3.0 Element's externalIdentifier property. See [OmniBOR Specification](https://github.com/omnibor/spec/), a minimalistic specification for describing software [Artifact Dependency Graphs](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-dependency-graph-adg). +var ContentIdentifierType_Gitoid = ContentIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType/gitoid", } -func (o *ElementList) SecurityVexNotAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVexNotAffectedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexNotAffectedVulnAssessmentRelationship) + +// ContentIdentifierType_Swhid SoftWare Hash IDentifier, a persistent intrinsic identifier for digital artifacts, such as files, trees (also known as directories or folders), commits, and other objects typically found in version control systems. The format of the identifiers is defined in the [SWHID specification](https://www.swhid.org/specification/v1.1/4.Syntax) (ISO/IEC DIS 18670). They typically look like `swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2`. +var ContentIdentifierType_Swhid = ContentIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType/swhid", } -func (o *ElementList) SecurityVexUnderInvestigationVulnAssessmentRelationshipIter() iter.Seq2[AnyElement, *SecurityVexUnderInvestigationVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexUnderInvestigationVulnAssessmentRelationship) + +type AnyCreationInfo interface { + asCreationInfo() *CreationInfo } -func (o *ElementList) SoftwareFileIter() iter.Seq2[AnyElement, *SoftwareFile] { - return typeIter(*o, castSoftwareFile) + +// CreationInfo Provides information about the creation of the Element. +type CreationInfo struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/CreationInfo"` + ID string `iri:"@id"` + // SpecVersion Provides a reference number that can be used to understand how to parse and\ninterpret an Element. + SpecVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/specVersion" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` + // Created Identifies when the Element was originally created. + Created time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/created" required:"true" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` + // CreatedUsing Identifies the tooling that was used during the creation of the Element. + CreatedUsing ToolList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/createdUsing" type:"https://spdx.org/rdf/3.0.1/terms/Core/Tool"` + // Comment Provide consumers with comments by the creator of the Element about the\nElement. + Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" type:"http://www.w3.org/2001/XMLSchema#string"` + // CreatedBy Identifies who or what created the Element. + CreatedBy AgentList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/createdBy" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Core/Agent"` } -func (o *ElementList) SoftwarePackageIter() iter.Seq2[AnyElement, *SoftwarePackage] { - return typeIter(*o, castSoftwarePackage) + +func (o *CreationInfo) asCreationInfo() *CreationInfo { + return o } -func (o *ElementList) SoftwareSbomIter() iter.Seq2[AnyElement, *SoftwareSbom] { - return typeIter(*o, castSoftwareSbom) + +type CreationInfoList []AnyCreationInfo + +func (o *CreationInfoList) CreationInfos() ld.TypeSeq[AnyCreationInfo, *CreationInfo] { + return ld.NewTypeSeq(*o, castCreationInfo) } -func (o *ElementList) SoftwareSnippetIter() iter.Seq2[AnyElement, *SoftwareSnippet] { - return typeIter(*o, castSoftwareSnippet) + +type AnyCustomLicense interface { + asCustomLicense() *CustomLicense } -func (o *ElementList) AiAIPackageIter() iter.Seq2[AnyElement, *AiAIPackage] { - return typeIter(*o, castAiAIPackage) + +// CustomLicense A license that is not listed on the SPDX License List. +type CustomLicense struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/CustomLicense"` + License } -func (o *ElementList) DatasetDatasetPackageIter() iter.Seq2[AnyElement, *DatasetDatasetPackage] { - return typeIter(*o, castDatasetDatasetPackage) + +func (o *CustomLicense) asCustomLicense() *CustomLicense { + return o } -// A collection of Elements, not necessarily with unifying context. -type ElementCollection struct { - Element +type CustomLicenseList []AnyCustomLicense - // Refers to one or more Elements that are part of an ElementCollection. - Elements ElementList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/element" iri-compact:"element"` +func (o *CustomLicenseList) CustomLicenses() ld.TypeSeq[AnyCustomLicense, *CustomLicense] { + return ld.NewTypeSeq(*o, castCustomLicense) +} - // Describes one a profile which the creator of this ElementCollection intends to - // conform to. - ProfileConformances []profileIdentifierType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/profileConformance" iri-compact:"profileConformance"` - // This property is used to denote the root Element(s) of a tree of elements contained in a BOM. - RootElements ElementList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/rootElement" iri-compact:"rootElement"` +type AnyCustomLicenseAddition interface { + asCustomLicenseAddition() *CustomLicenseAddition } -func castElementCollection(o any) *ElementCollection { - if o, ok := o.(AnyElementCollection); ok { - return o.asElementCollection() - } - return nil +// CustomLicenseAddition A license addition that is not listed on the SPDX Exceptions List. +type CustomLicenseAddition struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/CustomLicenseAddition"` + LicenseAddition } -func (o *ElementCollection) asElementCollection() *ElementCollection { +func (o *CustomLicenseAddition) asCustomLicenseAddition() *CustomLicenseAddition { return o } -type AnyElementCollection interface { - AnyElement - asElementCollection() *ElementCollection -} +type CustomLicenseAdditionList []AnyCustomLicenseAddition -type ElementCollectionList []AnyElementCollection +func (o *CustomLicenseAdditionList) CustomLicenseAdditions() ld.TypeSeq[AnyCustomLicenseAddition, *CustomLicenseAddition] { + return ld.NewTypeSeq(*o, castCustomLicenseAddition) +} -func (o *ElementCollectionList) ElementCollectionIter() iter.Seq2[AnyElementCollection, *ElementCollection] { - return typeIter(*o, castElementCollection) +// CvssSeverityType Specifies the CVSS base, temporal, threat, or environmental severity type. +type CvssSeverityType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType"` + id string `iri:"@id"` } -func (o *ElementCollectionList) SpdxDocumentIter() iter.Seq2[AnyElementCollection, *SpdxDocument] { - return typeIter(*o, castSpdxDocument) + +// CvssSeverityType_Critical When a CVSS score is between 9.0 - 10.0 +var CvssSeverityType_Critical = CvssSeverityType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/critical", } -func (o *ElementCollectionList) BundleIter() iter.Seq2[AnyElementCollection, *Bundle] { - return typeIter(*o, castBundle) + +// CvssSeverityType_High When a CVSS score is between 7.0 - 8.9 +var CvssSeverityType_High = CvssSeverityType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/high", } -func (o *ElementCollectionList) BomIter() iter.Seq2[AnyElementCollection, *Bom] { - return typeIter(*o, castBom) + +// CvssSeverityType_Low When a CVSS score is between 0.1 - 3.9 +var CvssSeverityType_Low = CvssSeverityType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/low", } -func (o *ElementCollectionList) SoftwareSbomIter() iter.Seq2[AnyElementCollection, *SoftwareSbom] { - return typeIter(*o, castSoftwareSbom) + +// CvssSeverityType_Medium When a CVSS score is between 4.0 - 6.9 +var CvssSeverityType_Medium = CvssSeverityType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/medium", } -// A reference to a resource identifier defined outside the scope of SPDX-3.0 content that uniquely identifies an Element. -type ExternalIdentifier struct { - ID string `iri:"@id"` +// CvssSeverityType_None When a CVSS score is 0.0 +var CvssSeverityType_None = CvssSeverityType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/none", +} - // Provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" iri-compact:"comment"` - // Specifies the type of the external identifier. - ExternalIdentifierType externalIdentifierType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalIdentifierType" iri-compact:"externalIdentifierType"` - // Uniquely identifies an external element. - Identifier string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/identifier" iri-compact:"identifier"` - // Provides the location for more information regarding an external identifier. - IdentifierLocators []string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/identifierLocator" iri-compact:"identifierLocator"` - // An entity that is authorized to issue identification credentials. - IssuingAuthority string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/issuingAuthority" iri-compact:"issuingAuthority"` +type AnyCvssV2VulnAssessmentRelationship interface { + asCvssV2VulnAssessmentRelationship() *CvssV2VulnAssessmentRelationship } -func castExternalIdentifier(o any) *ExternalIdentifier { - if o, ok := o.(AnyExternalIdentifier); ok { - return o.asExternalIdentifier() - } - return nil +// CvssV2VulnAssessmentRelationship Provides a CVSS version 2.0 assessment for a vulnerability. +type CvssV2VulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/CvssV2VulnAssessmentRelationship"` + VulnAssessmentRelationship + // VectorString Specifies the CVSS vector string for a vulnerability. + VectorString string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vectorString" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` + // Score Provides a numerical (0-10) representation of the severity of a vulnerability. + Score float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/score" required:"true" type:"http://www.w3.org/2001/XMLSchema#decimal"` } -func (o *ExternalIdentifier) asExternalIdentifier() *ExternalIdentifier { +func (o *CvssV2VulnAssessmentRelationship) asCvssV2VulnAssessmentRelationship() *CvssV2VulnAssessmentRelationship { return o } -type AnyExternalIdentifier interface { - asExternalIdentifier() *ExternalIdentifier +type CvssV2VulnAssessmentRelationshipList []AnyCvssV2VulnAssessmentRelationship + +func (o *CvssV2VulnAssessmentRelationshipList) CvssV2VulnAssessmentRelationships() ld.TypeSeq[AnyCvssV2VulnAssessmentRelationship, *CvssV2VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV2VulnAssessmentRelationship) } -type ExternalIdentifierList []AnyExternalIdentifier +type AnyCvssV3VulnAssessmentRelationship interface { + asCvssV3VulnAssessmentRelationship() *CvssV3VulnAssessmentRelationship +} -func (o *ExternalIdentifierList) ExternalIdentifierIter() iter.Seq2[AnyExternalIdentifier, *ExternalIdentifier] { - return typeIter(*o, castExternalIdentifier) +// CvssV3VulnAssessmentRelationship Provides a CVSS version 3 assessment for a vulnerability. +type CvssV3VulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/CvssV3VulnAssessmentRelationship"` + VulnAssessmentRelationship + // Score Provides a numerical (0-10) representation of the severity of a vulnerability. + Score float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/score" required:"true" type:"http://www.w3.org/2001/XMLSchema#decimal"` + // Severity Specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. + Severity CvssSeverityType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/severity" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType"` + // VectorString Specifies the CVSS vector string for a vulnerability. + VectorString string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vectorString" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` } -// Specifies the type of an external identifier. -type externalIdentifierType struct { - ID string `iri:"@id"` +func (o *CvssV3VulnAssessmentRelationship) asCvssV3VulnAssessmentRelationship() *CvssV3VulnAssessmentRelationship { + return o } -// [Common Platform Enumeration Specification 2.2](https://cpe.mitre.org/files/cpe-specification_2.2.pdf) -var ExternalIdentifierType_Cpe22 = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cpe22"} +type CvssV3VulnAssessmentRelationshipList []AnyCvssV3VulnAssessmentRelationship -// [Common Platform Enumeration: Naming Specification Version 2.3](https://csrc.nist.gov/publications/detail/nistir/7695/final) -var ExternalIdentifierType_Cpe23 = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cpe23"} +func (o *CvssV3VulnAssessmentRelationshipList) CvssV3VulnAssessmentRelationships() ld.TypeSeq[AnyCvssV3VulnAssessmentRelationship, *CvssV3VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV3VulnAssessmentRelationship) +} -// Common Vulnerabilities and Exposures identifiers, an identifier for a specific software flaw defined within the official CVE Dictionary and that conforms to the [CVE specification](https://csrc.nist.gov/glossary/term/cve_id). -var ExternalIdentifierType_Cve = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cve"} +type AnyCvssV4VulnAssessmentRelationship interface { + asCvssV4VulnAssessmentRelationship() *CvssV4VulnAssessmentRelationship +} -// Email address, as defined in [RFC 3696](https://datatracker.ietf.org/doc/rfc3986/) Section 3. -var ExternalIdentifierType_Email = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/email"} +// CvssV4VulnAssessmentRelationship Provides a CVSS version 4 assessment for a vulnerability. +type CvssV4VulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/CvssV4VulnAssessmentRelationship"` + VulnAssessmentRelationship + // Severity Specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. + Severity CvssSeverityType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/severity" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType"` + // VectorString Specifies the CVSS vector string for a vulnerability. + VectorString string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vectorString" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` + // Score Provides a numerical (0-10) representation of the severity of a vulnerability. + Score float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/score" required:"true" type:"http://www.w3.org/2001/XMLSchema#decimal"` +} -// [Gitoid](https://www.iana.org/assignments/uri-schemes/prov/gitoid), stands for [Git Object ID](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). A gitoid of type blob is a unique hash of a binary artifact. A gitoid may represent either an [Artifact Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-identifier-types) for the software artifact or an [Input Manifest Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#input-manifest-identifier) for the software artifact's associated [Artifact Input Manifest](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-input-manifest); this ambiguity exists because the Artifact Input Manifest is itself an artifact, and the gitoid of that artifact is its valid identifier. Gitoids calculated on software artifacts (Snippet, File, or Package Elements) should be recorded in the SPDX 3.0 SoftwareArtifact's contentIdentifier property. Gitoids calculated on the Artifact Input Manifest (Input Manifest Identifier) should be recorded in the SPDX 3.0 Element's externalIdentifier property. See [OmniBOR Specification](https://github.com/omnibor/spec/), a minimalistic specification for describing software [Artifact Dependency Graphs](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-dependency-graph-adg). -var ExternalIdentifierType_Gitoid = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/gitoid"} +func (o *CvssV4VulnAssessmentRelationship) asCvssV4VulnAssessmentRelationship() *CvssV4VulnAssessmentRelationship { + return o +} -// Used when the type does not match any of the other options. -var ExternalIdentifierType_Other = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/other"} +type CvssV4VulnAssessmentRelationshipList []AnyCvssV4VulnAssessmentRelationship -// Package URL, as defined in the corresponding [Annex](../../../annexes/pkg-url-specification.md) of this specification. -var ExternalIdentifierType_PackageUrl = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/packageUrl"} +func (o *CvssV4VulnAssessmentRelationshipList) CvssV4VulnAssessmentRelationships() ld.TypeSeq[AnyCvssV4VulnAssessmentRelationship, *CvssV4VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV4VulnAssessmentRelationship) +} -// Used when there is a security related identifier of unspecified type. -var ExternalIdentifierType_SecurityOther = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/securityOther"} +// DatasetAvailabilityType Availability of dataset. +type DatasetAvailabilityType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType"` + id string `iri:"@id"` +} -// SoftWare Hash IDentifier, a persistent intrinsic identifier for digital artifacts, such as files, trees (also known as directories or folders), commits, and other objects typically found in version control systems. The format of the identifiers is defined in the [SWHID specification](https://www.swhid.org/specification/v1.1/4.Syntax) (ISO/IEC DIS 18670). They typically look like `swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2`. -var ExternalIdentifierType_Swhid = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/swhid"} +// DatasetAvailabilityType_Clickthrough the dataset is not publicly available and can only be accessed after affirmatively accepting terms on a clickthrough webpage. +var DatasetAvailabilityType_Clickthrough = DatasetAvailabilityType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/clickthrough", +} -// Concise Software Identification (CoSWID) tag, as defined in [RFC 9393](https://datatracker.ietf.org/doc/rfc9393/) Section 2.3. -var ExternalIdentifierType_Swid = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/swid"} +// DatasetAvailabilityType_DirectDownload the dataset is publicly available and can be downloaded directly. +var DatasetAvailabilityType_DirectDownload = DatasetAvailabilityType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/directDownload", +} -// [Uniform Resource Identifier (URI) Schemes](https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml). The scheme used in order to locate a resource. -var ExternalIdentifierType_UrlScheme = externalIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/urlScheme"} +// DatasetAvailabilityType_Query the dataset is publicly available, but not all at once, and can only be accessed through queries which return parts of the dataset. +var DatasetAvailabilityType_Query = DatasetAvailabilityType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/query", +} -// A map of Element identifiers that are used within an SpdxDocument but defined -// external to that SpdxDocument. -type ExternalMap struct { - ID string `iri:"@id"` +// DatasetAvailabilityType_Registration the dataset is not publicly available and an email registration is required before accessing the dataset, although without an affirmative acceptance of terms. +var DatasetAvailabilityType_Registration = DatasetAvailabilityType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/registration", +} - // Artifact representing a serialization instance of SPDX data containing the - // definition of a particular Element. - DefiningArtifact AnyArtifact `iri:"https://spdx.org/rdf/3.0.1/terms/Core/definingArtifact" iri-compact:"definingArtifact"` +// DatasetAvailabilityType_ScrapingScript the dataset provider is not making available the underlying data and the dataset must be reassembled, typically using the provided script for scraping the data. +var DatasetAvailabilityType_ScrapingScript = DatasetAvailabilityType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/scrapingScript", +} - // Identifies an external Element used within an SpdxDocument but defined - // external to that SpdxDocument. - ExternalSpdxId string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalSpdxId" iri-compact:"externalSpdxId"` - // Provides an indication of where to retrieve an external Element. - LocationHint string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/locationHint" iri-compact:"locationHint"` - // Provides an IntegrityMethod with which the integrity of an Element can be - // asserted. - VerifiedUsings IntegrityMethodList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/verifiedUsing" iri-compact:"verifiedUsing"` +type AnyDatasetPackage interface { + asDatasetPackage() *DatasetPackage } -func castExternalMap(o any) *ExternalMap { - if o, ok := o.(AnyExternalMap); ok { - return o.asExternalMap() - } - return nil +// DatasetPackage Specifies a data package and its associated information. +type DatasetPackage struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetPackage"` + Package + // ConfidentialityLevel Describes the confidentiality level of the data points contained in the dataset. + ConfidentialityLevel ConfidentialityLevelType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/confidentialityLevel" type:"https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType"` + // AnonymizationMethodUseds Describes the anonymization methods used. + AnonymizationMethodUseds []string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/anonymizationMethodUsed" type:"http://www.w3.org/2001/XMLSchema#string"` + // DatasetUpdateMechanism Describes a mechanism to update the dataset. + DatasetUpdateMechanism string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetUpdateMechanism" type:"http://www.w3.org/2001/XMLSchema#string"` + // DatasetNoise Describes potentially noisy elements of the dataset. + DatasetNoise string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetNoise" type:"http://www.w3.org/2001/XMLSchema#string"` + // DatasetSize Captures the size of the dataset. + DatasetSize ld.NonNegativeInt `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetSize" type:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger"` + // Sensors Describes a sensor used for collecting the data. + Sensors DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/sensor" type:"https://spdx.org/rdf/3.0.1/terms/Core/DictionaryEntry"` + // IntendedUse Describes what the given dataset should be used for. + IntendedUse string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/intendedUse" type:"http://www.w3.org/2001/XMLSchema#string"` + // DataPreprocessings Describes the preprocessing steps that were applied to the raw data to create the given dataset. + DataPreprocessings []string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/dataPreprocessing" type:"http://www.w3.org/2001/XMLSchema#string"` + // KnownBias Records the biases that the dataset is known to encompass. + KnownBias []string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/knownBias" type:"http://www.w3.org/2001/XMLSchema#string"` + // DatasetAvailability The field describes the availability of a dataset. + DatasetAvailability DatasetAvailabilityType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetAvailability" type:"https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType"` + // HasSensitivePersonalInformation Describes if any sensitive personal information is present in the dataset. + HasSensitivePersonalInformation PresenceType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/hasSensitivePersonalInformation" type:"https://spdx.org/rdf/3.0.1/terms/Core/PresenceType"` + // DataCollectionProcess Describes how the dataset was collected. + DataCollectionProcess string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/dataCollectionProcess" type:"http://www.w3.org/2001/XMLSchema#string"` + // DatasetTypes Describes the type of the given dataset. + DatasetTypes []DatasetType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetType" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType"` } -func (o *ExternalMap) asExternalMap() *ExternalMap { +func (o *DatasetPackage) asDatasetPackage() *DatasetPackage { return o } -type AnyExternalMap interface { - asExternalMap() *ExternalMap -} +type DatasetPackageList []AnyDatasetPackage -type ExternalMapList []AnyExternalMap +func (o *DatasetPackageList) DatasetPackages() ld.TypeSeq[AnyDatasetPackage, *DatasetPackage] { + return ld.NewTypeSeq(*o, castDatasetPackage) +} -func (o *ExternalMapList) ExternalMapIter() iter.Seq2[AnyExternalMap, *ExternalMap] { - return typeIter(*o, castExternalMap) +// DatasetType Enumeration of dataset types. +type DatasetType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType"` + id string `iri:"@id"` } -// A reference to a resource outside the scope of SPDX-3.0 content related to an Element. -type ExternalRef struct { - ID string `iri:"@id"` +// DatasetType_Audio data is audio based, such as a collection of music from the 80s. +var DatasetType_Audio = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/audio", +} - // Provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" iri-compact:"comment"` - // Provides information about the content type of an Element or a Property. - ContentType string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/contentType" iri-compact:"contentType"` - // Specifies the type of the external reference. - ExternalRefType externalRefType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalRefType" iri-compact:"externalRefType"` - // Provides the location of an external reference. - Locators []string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/locator" iri-compact:"locator"` +// DatasetType_Categorical data that is classified into a discrete number of categories, such as the eye color of a population of people. +var DatasetType_Categorical = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/categorical", } -func castExternalRef(o any) *ExternalRef { - if o, ok := o.(AnyExternalRef); ok { - return o.asExternalRef() - } - return nil +// DatasetType_Graph data is in the form of a graph where entries are somehow related to each other through edges, such a social network of friends. +var DatasetType_Graph = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/graph", } -func (o *ExternalRef) asExternalRef() *ExternalRef { - return o +// DatasetType_Image data is a collection of images such as pictures of animals. +var DatasetType_Image = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/image", } -type AnyExternalRef interface { - asExternalRef() *ExternalRef +// DatasetType_NoAssertion data type is not known. +var DatasetType_NoAssertion = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/noAssertion", } -type ExternalRefList []AnyExternalRef +// DatasetType_Numeric data consists only of numeric entries. +var DatasetType_Numeric = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/numeric", +} -func (o *ExternalRefList) ExternalRefIter() iter.Seq2[AnyExternalRef, *ExternalRef] { - return typeIter(*o, castExternalRef) +// DatasetType_Other data is of a type not included in this list. +var DatasetType_Other = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/other", } -// Specifies the type of an external reference. -type externalRefType struct { - ID string `iri:"@id"` +// DatasetType_Sensor data is recorded from a physical sensor, such as a thermometer reading or biometric device. +var DatasetType_Sensor = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/sensor", } -// A reference to an alternative download location. -var ExternalRefType_AltDownloadLocation = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/altDownloadLocation"} +// DatasetType_Structured data is stored in tabular format or retrieved from a relational database. +var DatasetType_Structured = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/structured", +} -// A reference to an alternative web page. -var ExternalRefType_AltWebPage = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/altWebPage"} +// DatasetType_Syntactic data describes the syntax or semantics of a language or text, such as a parse tree used for natural language processing. +var DatasetType_Syntactic = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/syntactic", +} -// A reference to binary artifacts related to a package. -var ExternalRefType_BinaryArtifact = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/binaryArtifact"} +// DatasetType_Text data consists of unstructured text, such as a book, Wikipedia article (without images), or transcript. +var DatasetType_Text = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/text", +} -// A reference to a Bower package. The package locator format, looks like `package#version`, is defined in the "install" section of [Bower API documentation](https://bower.io/docs/api/#install). -var ExternalRefType_Bower = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/bower"} +// DatasetType_Timeseries data is recorded in an ordered sequence of timestamped entries, such as the price of a stock over the course of a day. +var DatasetType_Timeseries = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/timeseries", +} -// A reference build metadata related to a published package. -var ExternalRefType_BuildMeta = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/buildMeta"} +// DatasetType_Timestamp data is recorded with a timestamp for each entry, but not necessarily ordered or at specific intervals, such as when a taxi ride starts and ends. +var DatasetType_Timestamp = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/timestamp", +} -// A reference build system used to create or publish the package. -var ExternalRefType_BuildSystem = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/buildSystem"} +// DatasetType_Video data is video based, such as a collection of movie clips featuring Tom Hanks. +var DatasetType_Video = DatasetType{ + id: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/video", +} -// A reference to a certification report for a package from an accredited/independent body. -var ExternalRefType_CertificationReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/certificationReport"} +type AnyDictionaryEntry interface { + asDictionaryEntry() *DictionaryEntry +} -// A reference to the instant messaging system used by the maintainer for a package. -var ExternalRefType_Chat = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/chat"} +// DictionaryEntry A key with an associated value. +type DictionaryEntry struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/DictionaryEntry"` + ID string `iri:"@id"` + // Value A value used in a generic key-value pair. + Value string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/value" type:"http://www.w3.org/2001/XMLSchema#string"` + // Key A key used in a generic key-value pair. + Key string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/key" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` +} -// A reference to a Software Composition Analysis (SCA) report. -var ExternalRefType_ComponentAnalysisReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/componentAnalysisReport"} +func (o *DictionaryEntry) asDictionaryEntry() *DictionaryEntry { + return o +} -// [Common Weakness Enumeration](https://csrc.nist.gov/glossary/term/common_weakness_enumeration). A reference to a source of software flaw defined within the official [CWE List](https://cwe.mitre.org/data/) that conforms to the [CWE specification](https://cwe.mitre.org/). -var ExternalRefType_Cwe = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/cwe"} +type DictionaryEntryList []AnyDictionaryEntry -// A reference to the documentation for a package. -var ExternalRefType_Documentation = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/documentation"} +func (o *DictionaryEntryList) DictionaryEntries() ld.TypeSeq[AnyDictionaryEntry, *DictionaryEntry] { + return ld.NewTypeSeq(*o, castDictionaryEntry) +} -// A reference to a dynamic analysis report for a package. -var ExternalRefType_DynamicAnalysisReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/dynamicAnalysisReport"} +type AnyDisjunctiveLicenseSet interface { + asDisjunctiveLicenseSet() *DisjunctiveLicenseSet +} -// A reference to the End Of Sale (EOS) and/or End Of Life (EOL) information related to a package. -var ExternalRefType_EolNotice = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/eolNotice"} +// DisjunctiveLicenseSet Portion of an AnyLicenseInfo representing a set of licensing information where\nonly one of the elements applies. +type DisjunctiveLicenseSet struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/DisjunctiveLicenseSet"` + LicenseInfo + // Members A license expression participating in a license set. + Members LicenseInfoList `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/member" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/AnyLicenseInfo"` +} -// A reference to a export control assessment for a package. -var ExternalRefType_ExportControlAssessment = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/exportControlAssessment"} +func (o *DisjunctiveLicenseSet) asDisjunctiveLicenseSet() *DisjunctiveLicenseSet { + return o +} -// A reference to funding information related to a package. -var ExternalRefType_Funding = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/funding"} +type DisjunctiveLicenseSetList []AnyDisjunctiveLicenseSet -// A reference to the issue tracker for a package. -var ExternalRefType_IssueTracker = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/issueTracker"} +func (o *DisjunctiveLicenseSetList) DisjunctiveLicenseSets() ld.TypeSeq[AnyDisjunctiveLicenseSet, *DisjunctiveLicenseSet] { + return ld.NewTypeSeq(*o, castDisjunctiveLicenseSet) +} -// A reference to additional license information related to an artifact. -var ExternalRefType_License = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/license"} +type AnyElement interface { + asElement() *Element +} -// A reference to the mailing list used by the maintainer for a package. -var ExternalRefType_MailingList = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/mailingList"} +// Element Base domain class from which all other SPDX-3.0 domain classes derive. +type Element struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/Element"` + ID string `iri:"@id"` + // Description Provides a detailed description of the Element. + Description string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/description" type:"http://www.w3.org/2001/XMLSchema#string"` + // Comment Provide consumers with comments by the creator of the Element about the\nElement. + Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" type:"http://www.w3.org/2001/XMLSchema#string"` + // Name Identifies the name of an Element as designated by the creator. + Name string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/name" type:"http://www.w3.org/2001/XMLSchema#string"` + // Extensions Specifies an Extension characterization of some aspect of an Element. + Extensions []Extension `iri:"https://spdx.org/rdf/3.0.1/terms/Core/extension" type:"https://spdx.org/rdf/3.0.1/terms/Extension/Extension"` + // CreationInfo Provides information about the creation of the Element. + CreationInfo AnyCreationInfo `iri:"https://spdx.org/rdf/3.0.1/terms/Core/creationInfo" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Core/CreationInfo"` + // ExternalIdentifiers Provides a reference to a resource outside the scope of SPDX-3.0 content\nthat uniquely identifies an Element. + ExternalIdentifiers ExternalIdentifierList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalIdentifier" type:"https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifier"` + // ExternalRefs Points to a resource outside the scope of the SPDX-3.0 content\nthat provides additional characteristics of an Element. + ExternalRefs ExternalRefList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalRef" type:"https://spdx.org/rdf/3.0.1/terms/Core/ExternalRef"` + // Summary A short description of an Element. + Summary string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/summary" type:"http://www.w3.org/2001/XMLSchema#string"` + // VerifiedUsings Provides an IntegrityMethod with which the integrity of an Element can be\nasserted. + VerifiedUsings IntegrityMethodList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/verifiedUsing" type:"https://spdx.org/rdf/3.0.1/terms/Core/IntegrityMethod"` +} -// A reference to a Maven repository artifact. The artifact locator format is defined in the [Maven documentation](https://maven.apache.org/guides/mini/guide-naming-conventions.html) and looks like `groupId:artifactId[:version]`. -var ExternalRefType_MavenCentral = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/mavenCentral"} +func (o *Element) asElement() *Element { + return o +} -// A reference to metrics related to package such as OpenSSF scorecards. -var ExternalRefType_Metrics = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/metrics"} +type ElementList []AnyElement -// A reference to an npm package. The package locator format is defined in the [npm documentation](https://docs.npmjs.com/cli/v10/configuring-npm/package-json) and looks like `package@version`. -var ExternalRefType_Npm = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/npm"} +func (o *ElementList) AIPackages() ld.TypeSeq[AnyElement, *AIPackage] { + return ld.NewTypeSeq(*o, castAIPackage) +} -// A reference to a NuGet package. The package locator format is defined in the [NuGet documentation](https://docs.nuget.org) and looks like `package/version`. -var ExternalRefType_Nuget = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/nuget"} +func (o *ElementList) Agents() ld.TypeSeq[AnyElement, *Agent] { + return ld.NewTypeSeq(*o, castAgent) +} -// Used when the type does not match any of the other options. -var ExternalRefType_Other = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/other"} +func (o *ElementList) Annotations() ld.TypeSeq[AnyElement, *Annotation] { + return ld.NewTypeSeq(*o, castAnnotation) +} -// A reference to a privacy assessment for a package. -var ExternalRefType_PrivacyAssessment = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/privacyAssessment"} +func (o *ElementList) Artifacts() ld.TypeSeq[AnyElement, *Artifact] { + return ld.NewTypeSeq(*o, castArtifact) +} -// A reference to additional product metadata such as reference within organization's product catalog. -var ExternalRefType_ProductMetadata = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/productMetadata"} +func (o *ElementList) Boms() ld.TypeSeq[AnyElement, *Bom] { + return ld.NewTypeSeq(*o, castBom) +} -// A reference to a purchase order for a package. -var ExternalRefType_PurchaseOrder = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/purchaseOrder"} +func (o *ElementList) Builds() ld.TypeSeq[AnyElement, *Build] { + return ld.NewTypeSeq(*o, castBuild) +} -// A reference to a quality assessment for a package. -var ExternalRefType_QualityAssessmentReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/qualityAssessmentReport"} +func (o *ElementList) Bundles() ld.TypeSeq[AnyElement, *Bundle] { + return ld.NewTypeSeq(*o, castBundle) +} -// A reference to a published list of releases for a package. -var ExternalRefType_ReleaseHistory = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/releaseHistory"} +func (o *ElementList) ConjunctiveLicenseSets() ld.TypeSeq[AnyElement, *ConjunctiveLicenseSet] { + return ld.NewTypeSeq(*o, castConjunctiveLicenseSet) +} -// A reference to the release notes for a package. -var ExternalRefType_ReleaseNotes = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/releaseNotes"} +func (o *ElementList) CustomLicenses() ld.TypeSeq[AnyElement, *CustomLicense] { + return ld.NewTypeSeq(*o, castCustomLicense) +} -// A reference to a risk assessment for a package. -var ExternalRefType_RiskAssessment = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/riskAssessment"} +func (o *ElementList) CustomLicenseAdditions() ld.TypeSeq[AnyElement, *CustomLicenseAddition] { + return ld.NewTypeSeq(*o, castCustomLicenseAddition) +} -// A reference to a runtime analysis report for a package. -var ExternalRefType_RuntimeAnalysisReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/runtimeAnalysisReport"} +func (o *ElementList) CvssV2VulnAssessmentRelationships() ld.TypeSeq[AnyElement, *CvssV2VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV2VulnAssessmentRelationship) +} -// A reference to information assuring that the software is developed using security practices as defined by [NIST SP 800-218 Secure Software Development Framework (SSDF) Version 1.1](https://csrc.nist.gov/pubs/sp/800/218/final) or [CISA Secure Software Development Attestation Form](https://www.cisa.gov/resources-tools/resources/secure-software-development-attestation-form). -var ExternalRefType_SecureSoftwareAttestation = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/secureSoftwareAttestation"} +func (o *ElementList) CvssV3VulnAssessmentRelationships() ld.TypeSeq[AnyElement, *CvssV3VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV3VulnAssessmentRelationship) +} -// A reference to the security adversary model for a package. -var ExternalRefType_SecurityAdversaryModel = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityAdversaryModel"} +func (o *ElementList) CvssV4VulnAssessmentRelationships() ld.TypeSeq[AnyElement, *CvssV4VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV4VulnAssessmentRelationship) +} -// A reference to a published security advisory (where advisory as defined per [ISO 29147:2018](https://www.iso.org/standard/72311.html)) that may affect one or more elements, e.g., vendor advisories or specific NVD entries. -var ExternalRefType_SecurityAdvisory = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityAdvisory"} +func (o *ElementList) DatasetPackages() ld.TypeSeq[AnyElement, *DatasetPackage] { + return ld.NewTypeSeq(*o, castDatasetPackage) +} -// A reference to the patch or source code that fixes a vulnerability. -var ExternalRefType_SecurityFix = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityFix"} +func (o *ElementList) DisjunctiveLicenseSets() ld.TypeSeq[AnyElement, *DisjunctiveLicenseSet] { + return ld.NewTypeSeq(*o, castDisjunctiveLicenseSet) +} -// A reference to related security information of unspecified type. -var ExternalRefType_SecurityOther = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityOther"} +func (o *ElementList) Elements() ld.TypeSeq[AnyElement, *Element] { + return ld.NewTypeSeq(*o, castElement) +} -// A reference to a [penetration test](https://en.wikipedia.org/wiki/Penetration_test) report for a package. -var ExternalRefType_SecurityPenTestReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityPenTestReport"} +func (o *ElementList) ElementCollections() ld.TypeSeq[AnyElement, *ElementCollection] { + return ld.NewTypeSeq(*o, castElementCollection) +} -// A reference to instructions for reporting newly discovered security vulnerabilities for a package. -var ExternalRefType_SecurityPolicy = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityPolicy"} +func (o *ElementList) EpssVulnAssessmentRelationships() ld.TypeSeq[AnyElement, *EpssVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castEpssVulnAssessmentRelationship) +} -// A reference the [security threat model](https://en.wikipedia.org/wiki/Threat_model) for a package. -var ExternalRefType_SecurityThreatModel = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityThreatModel"} +func (o *ElementList) ExploitCatalogVulnAssessmentRelationships() ld.TypeSeq[AnyElement, *ExploitCatalogVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castExploitCatalogVulnAssessmentRelationship) +} -// A reference to a social media channel for a package. -var ExternalRefType_SocialMedia = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/socialMedia"} +func (o *ElementList) ExtendableLicenses() ld.TypeSeq[AnyElement, *ExtendableLicense] { + return ld.NewTypeSeq(*o, castExtendableLicense) +} -// A reference to an artifact containing the sources for a package. -var ExternalRefType_SourceArtifact = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/sourceArtifact"} +func (o *ElementList) Files() ld.TypeSeq[AnyElement, *File] { + return ld.NewTypeSeq(*o, castFile) +} -// A reference to a static analysis report for a package. -var ExternalRefType_StaticAnalysisReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/staticAnalysisReport"} +func (o *ElementList) IndividualElements() ld.TypeSeq[AnyElement, *IndividualElement] { + return ld.NewTypeSeq(*o, castIndividualElement) +} -// A reference to the software support channel or other support information for a package. -var ExternalRefType_Support = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/support"} +func (o *ElementList) IndividualLicensingInfos() ld.TypeSeq[AnyElement, *IndividualLicensingInfo] { + return ld.NewTypeSeq(*o, castIndividualLicensingInfo) +} -// A reference to a version control system related to a software artifact. -var ExternalRefType_Vcs = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vcs"} +func (o *ElementList) Licenses() ld.TypeSeq[AnyElement, *License] { + return ld.NewTypeSeq(*o, castLicense) +} -// A reference to a Vulnerability Disclosure Report (VDR) which provides the software supplier's analysis and findings describing the impact (or lack of impact) that reported vulnerabilities have on packages or products in the supplier's SBOM as defined in [NIST SP 800-161 Cybersecurity Supply Chain Risk Management Practices for Systems and Organizations](https://csrc.nist.gov/pubs/sp/800/161/r1/final). -var ExternalRefType_VulnerabilityDisclosureReport = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vulnerabilityDisclosureReport"} +func (o *ElementList) LicenseAdditions() ld.TypeSeq[AnyElement, *LicenseAddition] { + return ld.NewTypeSeq(*o, castLicenseAddition) +} -// A reference to a Vulnerability Exploitability eXchange (VEX) statement which provides information on whether a product is impacted by a specific vulnerability in an included package and, if affected, whether there are actions recommended to remediate. See also [NTIA VEX one-page summary](https://ntia.gov/files/ntia/publications/vex_one-page_summary.pdf). -var ExternalRefType_VulnerabilityExploitabilityAssessment = externalRefType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vulnerabilityExploitabilityAssessment"} +func (o *ElementList) LicenseExpressions() ld.TypeSeq[AnyElement, *LicenseExpression] { + return ld.NewTypeSeq(*o, castLicenseExpression) +} -// A mathematical algorithm that maps data of arbitrary size to a bit string. -type hashAlgorithm struct { - ID string `iri:"@id"` +func (o *ElementList) LicenseInfos() ld.TypeSeq[AnyElement, *LicenseInfo] { + return ld.NewTypeSeq(*o, castLicenseInfo) } -// Adler-32 checksum is part of the widely used zlib compression library as defined in [RFC 1950](https://datatracker.ietf.org/doc/rfc1950/) Section 2.3. -var HashAlgorithm_Adler32 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/adler32"} +func (o *ElementList) LifecycleScopedRelationships() ld.TypeSeq[AnyElement, *LifecycleScopedRelationship] { + return ld.NewTypeSeq(*o, castLifecycleScopedRelationship) +} -// BLAKE2b algorithm with a digest size of 256, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. -var HashAlgorithm_Blake2b256 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b256"} +func (o *ElementList) ListedLicenses() ld.TypeSeq[AnyElement, *ListedLicense] { + return ld.NewTypeSeq(*o, castListedLicense) +} -// BLAKE2b algorithm with a digest size of 384, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. -var HashAlgorithm_Blake2b384 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b384"} +func (o *ElementList) ListedLicenseExceptions() ld.TypeSeq[AnyElement, *ListedLicenseException] { + return ld.NewTypeSeq(*o, castListedLicenseException) +} -// BLAKE2b algorithm with a digest size of 512, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. -var HashAlgorithm_Blake2b512 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b512"} +func (o *ElementList) OrLaterOperators() ld.TypeSeq[AnyElement, *OrLaterOperator] { + return ld.NewTypeSeq(*o, castOrLaterOperator) +} -// [BLAKE3](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf) -var HashAlgorithm_Blake3 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake3"} +func (o *ElementList) Organizations() ld.TypeSeq[AnyElement, *Organization] { + return ld.NewTypeSeq(*o, castOrganization) +} -// [Dilithium](https://pq-crystals.org/dilithium/) -var HashAlgorithm_CrystalsDilithium = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/crystalsDilithium"} +func (o *ElementList) Packages() ld.TypeSeq[AnyElement, *Package] { + return ld.NewTypeSeq(*o, castPackage) +} -// [Kyber](https://pq-crystals.org/kyber/) -var HashAlgorithm_CrystalsKyber = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/crystalsKyber"} +func (o *ElementList) People() ld.TypeSeq[AnyElement, *Person] { + return ld.NewTypeSeq(*o, castPerson) +} -// [FALCON](https://falcon-sign.info/falcon.pdf) -var HashAlgorithm_Falcon = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/falcon"} +func (o *ElementList) Relationships() ld.TypeSeq[AnyElement, *Relationship] { + return ld.NewTypeSeq(*o, castRelationship) +} -// MD2 message-digest algorithm, as defined in [RFC 1319](https://datatracker.ietf.org/doc/rfc1319/). -var HashAlgorithm_Md2 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md2"} +func (o *ElementList) Sboms() ld.TypeSeq[AnyElement, *Sbom] { + return ld.NewTypeSeq(*o, castSbom) +} -// MD4 message-digest algorithm, as defined in [RFC 1186](https://datatracker.ietf.org/doc/rfc1186/). -var HashAlgorithm_Md4 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md4"} +func (o *ElementList) SimpleLicensingTexts() ld.TypeSeq[AnyElement, *SimpleLicensingText] { + return ld.NewTypeSeq(*o, castSimpleLicensingText) +} -// MD5 message-digest algorithm, as defined in [RFC 1321](https://datatracker.ietf.org/doc/rfc1321/). -var HashAlgorithm_Md5 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md5"} +func (o *ElementList) Snippets() ld.TypeSeq[AnyElement, *Snippet] { + return ld.NewTypeSeq(*o, castSnippet) +} -// [MD6 hash function](https://people.csail.mit.edu/rivest/pubs/RABCx08.pdf) -var HashAlgorithm_Md6 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md6"} +func (o *ElementList) SoftwareAgents() ld.TypeSeq[AnyElement, *SoftwareAgent] { + return ld.NewTypeSeq(*o, castSoftwareAgent) +} -// any hashing algorithm that does not exist in this list of entries -var HashAlgorithm_Other = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/other"} +func (o *ElementList) SoftwareArtifacts() ld.TypeSeq[AnyElement, *SoftwareArtifact] { + return ld.NewTypeSeq(*o, castSoftwareArtifact) +} -// SHA-1, a secure hashing algorithm, as defined in [RFC 3174](https://datatracker.ietf.org/doc/rfc3174/). -var HashAlgorithm_Sha1 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha1"} +func (o *ElementList) SpdxDocuments() ld.TypeSeq[AnyElement, *SpdxDocument] { + return ld.NewTypeSeq(*o, castSpdxDocument) +} -// SHA-2 with a digest length of 224, as defined in [RFC 3874](https://datatracker.ietf.org/doc/rfc3874/). -var HashAlgorithm_Sha224 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha224"} +func (o *ElementList) SsvcVulnAssessmentRelationships() ld.TypeSeq[AnyElement, *SsvcVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castSsvcVulnAssessmentRelationship) +} -// SHA-2 with a digest length of 256, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). -var HashAlgorithm_Sha256 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha256"} +func (o *ElementList) Tools() ld.TypeSeq[AnyElement, *Tool] { + return ld.NewTypeSeq(*o, castTool) +} -// SHA-2 with a digest length of 384, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). -var HashAlgorithm_Sha384 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha384"} +func (o *ElementList) VexAffectedVulnAssessmentRelationships() ld.TypeSeq[AnyElement, *VexAffectedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexAffectedVulnAssessmentRelationship) +} -// SHA-3 with a digest length of 224, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). -var HashAlgorithm_Sha3224 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_224"} +func (o *ElementList) VexFixedVulnAssessmentRelationships() ld.TypeSeq[AnyElement, *VexFixedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexFixedVulnAssessmentRelationship) +} -// SHA-3 with a digest length of 256, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). -var HashAlgorithm_Sha3256 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_256"} +func (o *ElementList) VexNotAffectedVulnAssessmentRelationships() ld.TypeSeq[AnyElement, *VexNotAffectedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexNotAffectedVulnAssessmentRelationship) +} -// SHA-3 with a digest length of 384, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). -var HashAlgorithm_Sha3384 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_384"} +func (o *ElementList) VexUnderInvestigationVulnAssessmentRelationships() ld.TypeSeq[AnyElement, *VexUnderInvestigationVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexUnderInvestigationVulnAssessmentRelationship) +} -// SHA-3 with a digest length of 512, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). -var HashAlgorithm_Sha3512 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_512"} +func (o *ElementList) VexVulnAssessmentRelationships() ld.TypeSeq[AnyElement, *VexVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexVulnAssessmentRelationship) +} -// SHA-2 with a digest length of 512, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). -var HashAlgorithm_Sha512 = hashAlgorithm{ID: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha512"} +func (o *ElementList) VulnAssessmentRelationships() ld.TypeSeq[AnyElement, *VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVulnAssessmentRelationship) +} -// A concrete subclass of Element used by Individuals in the -// Core profile. -type IndividualElement struct { - Element +func (o *ElementList) Vulnerabilities() ld.TypeSeq[AnyElement, *Vulnerability] { + return ld.NewTypeSeq(*o, castVulnerability) } -// An Individual Value for Element representing a set of Elements of unknown -// identify or cardinality (number). -var IndividualElement_NoAssertionElement = IndividualElement{Element: Element{ID: "https://spdx.org/rdf/3.0.1/terms/Core/NoAssertionElement"}} +func (o *ElementList) WithAdditionOperators() ld.TypeSeq[AnyElement, *WithAdditionOperator] { + return ld.NewTypeSeq(*o, castWithAdditionOperator) +} -// An Individual Value for Element representing a set of Elements with -// cardinality (number/count) of zero. -var IndividualElement_NoneElement = IndividualElement{Element: Element{ID: "https://spdx.org/rdf/3.0.1/terms/Core/NoneElement"}} +type AnyElementCollection interface { + asElementCollection() *ElementCollection +} -func castIndividualElement(o any) *IndividualElement { - if o, ok := o.(AnyIndividualElement); ok { - return o.asIndividualElement() - } - return nil +// ElementCollection A collection of Elements, not necessarily with unifying context. +type ElementCollection struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/ElementCollection"` + Element + // Elements Refers to one or more Elements that are part of an ElementCollection. + Elements ElementList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/element" type:"https://spdx.org/rdf/3.0.1/terms/Core/Element"` + // RootElements This property is used to denote the root Element(s) of a tree of elements contained in a BOM. + RootElements ElementList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/rootElement" type:"https://spdx.org/rdf/3.0.1/terms/Core/Element"` + // ProfileConformances Describes one a profile which the creator of this ElementCollection intends to\nconform to. + ProfileConformances []ProfileIdentifierType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/profileConformance" type:"https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType"` } -func (o *IndividualElement) asIndividualElement() *IndividualElement { +func (o *ElementCollection) asElementCollection() *ElementCollection { return o } -type AnyIndividualElement interface { - AnyElement - asIndividualElement() *IndividualElement +type ElementCollectionList []AnyElementCollection + +func (o *ElementCollectionList) Boms() ld.TypeSeq[AnyElementCollection, *Bom] { + return ld.NewTypeSeq(*o, castBom) } -type IndividualElementList []AnyIndividualElement +func (o *ElementCollectionList) Bundles() ld.TypeSeq[AnyElementCollection, *Bundle] { + return ld.NewTypeSeq(*o, castBundle) +} -func (o *IndividualElementList) IndividualElementIter() iter.Seq2[AnyIndividualElement, *IndividualElement] { - return typeIter(*o, castIndividualElement) +func (o *ElementCollectionList) ElementCollections() ld.TypeSeq[AnyElementCollection, *ElementCollection] { + return ld.NewTypeSeq(*o, castElementCollection) } -// Provides an independently reproducible mechanism that permits verification of a specific Element. -type IntegrityMethod struct { - ID string `iri:"@id"` +func (o *ElementCollectionList) Sboms() ld.TypeSeq[AnyElementCollection, *Sbom] { + return ld.NewTypeSeq(*o, castSbom) +} - // Provide consumers with comments by the creator of the Element about the - // Element. - Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" iri-compact:"comment"` +func (o *ElementCollectionList) SpdxDocuments() ld.TypeSeq[AnyElementCollection, *SpdxDocument] { + return ld.NewTypeSeq(*o, castSpdxDocument) } -func castIntegrityMethod(o any) *IntegrityMethod { - if o, ok := o.(AnyIntegrityMethod); ok { - return o.asIntegrityMethod() - } - return nil +type AnyEnergyConsumption interface { + asEnergyConsumption() *EnergyConsumption } -func (o *IntegrityMethod) asIntegrityMethod() *IntegrityMethod { - return o +// EnergyConsumption A class for describing the energy consumption incurred by an AI model in\ndifferent stages of its lifecycle. +type EnergyConsumption struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/AI/EnergyConsumption"` + ID string `iri:"@id"` + // InferenceEnergyConsumptions Specifies the amount of energy consumed during inference time by an AI model\nthat is being used in the AI system. + InferenceEnergyConsumptions EnergyConsumptionDescriptionList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/inferenceEnergyConsumption" type:"https://spdx.org/rdf/3.0.1/terms/AI/EnergyConsumptionDescription"` + // TrainingEnergyConsumptions Specifies the amount of energy consumed when training the AI model that is\nbeing used in the AI system. + TrainingEnergyConsumptions EnergyConsumptionDescriptionList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/trainingEnergyConsumption" type:"https://spdx.org/rdf/3.0.1/terms/AI/EnergyConsumptionDescription"` + // FinetuningEnergyConsumptions Specifies the amount of energy consumed when finetuning the AI model that is\nbeing used in the AI system. + FinetuningEnergyConsumptions EnergyConsumptionDescriptionList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/finetuningEnergyConsumption" type:"https://spdx.org/rdf/3.0.1/terms/AI/EnergyConsumptionDescription"` } -type AnyIntegrityMethod interface { - asIntegrityMethod() *IntegrityMethod +func (o *EnergyConsumption) asEnergyConsumption() *EnergyConsumption { + return o } -type IntegrityMethodList []AnyIntegrityMethod +type EnergyConsumptionList []AnyEnergyConsumption -func (o *IntegrityMethodList) IntegrityMethodIter() iter.Seq2[AnyIntegrityMethod, *IntegrityMethod] { - return typeIter(*o, castIntegrityMethod) +func (o *EnergyConsumptionList) EnergyConsumptions() ld.TypeSeq[AnyEnergyConsumption, *EnergyConsumption] { + return ld.NewTypeSeq(*o, castEnergyConsumption) } -func (o *IntegrityMethodList) PackageVerificationCodeIter() iter.Seq2[AnyIntegrityMethod, *PackageVerificationCode] { - return typeIter(*o, castPackageVerificationCode) -} -func (o *IntegrityMethodList) SoftwareContentIdentifierIter() iter.Seq2[AnyIntegrityMethod, *SoftwareContentIdentifier] { - return typeIter(*o, castSoftwareContentIdentifier) -} -func (o *IntegrityMethodList) HashIter() iter.Seq2[AnyIntegrityMethod, *Hash] { - return typeIter(*o, castHash) + +type AnyEnergyConsumptionDescription interface { + asEnergyConsumptionDescription() *EnergyConsumptionDescription } -// Provide an enumerated set of lifecycle phases that can provide context to relationships. -type lifecycleScopeType struct { - ID string `iri:"@id"` +// EnergyConsumptionDescription The class that helps note down the quantity of energy consumption and the unit\nused for measurement. +type EnergyConsumptionDescription struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/AI/EnergyConsumptionDescription"` + ID string `iri:"@id"` + // EnergyQuantity Represents the energy quantity. + EnergyQuantity float64 `iri:"https://spdx.org/rdf/3.0.1/terms/AI/energyQuantity" required:"true" type:"http://www.w3.org/2001/XMLSchema#decimal"` + // EnergyUnit Specifies the unit in which energy is measured. + EnergyUnit EnergyUnitType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/energyUnit" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType"` } -// A relationship has specific context implications during an element's build phase, during development. -var LifecycleScopeType_Build = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/build"} +func (o *EnergyConsumptionDescription) asEnergyConsumptionDescription() *EnergyConsumptionDescription { + return o +} -// A relationship has specific context implications during an element's design. -var LifecycleScopeType_Design = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/design"} +type EnergyConsumptionDescriptionList []AnyEnergyConsumptionDescription -// A relationship has specific context implications during development phase of an element. -var LifecycleScopeType_Development = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/development"} +func (o *EnergyConsumptionDescriptionList) EnergyConsumptionDescriptions() ld.TypeSeq[AnyEnergyConsumptionDescription, *EnergyConsumptionDescription] { + return ld.NewTypeSeq(*o, castEnergyConsumptionDescription) +} -// A relationship has other specific context information necessary to capture that the above set of enumerations does not handle. -var LifecycleScopeType_Other = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/other"} +// EnergyUnitType Specifies the unit of energy consumption. +type EnergyUnitType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType"` + id string `iri:"@id"` +} -// A relationship has specific context implications during the execution phase of an element. -var LifecycleScopeType_Runtime = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/runtime"} +// EnergyUnitType_KilowattHour Kilowatt-hour. +var EnergyUnitType_KilowattHour = EnergyUnitType{ + id: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/kilowattHour", +} -// A relationship has specific context implications during an element's testing phase, during development. -var LifecycleScopeType_Test = lifecycleScopeType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/test"} +// EnergyUnitType_Megajoule Megajoule. +var EnergyUnitType_Megajoule = EnergyUnitType{ + id: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/megajoule", +} -// A mapping between prefixes and namespace partial URIs. -type NamespaceMap struct { - ID string `iri:"@id"` +// EnergyUnitType_Other Any other units of energy measurement. +var EnergyUnitType_Other = EnergyUnitType{ + id: "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/other", +} - // Provides an unambiguous mechanism for conveying a URI fragment portion of an - // Element ID. - Namespace string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/namespace" iri-compact:"namespace"` - // A substitute for a URI. - Prefix string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/prefix" iri-compact:"prefix"` +type AnyEpssVulnAssessmentRelationship interface { + asEpssVulnAssessmentRelationship() *EpssVulnAssessmentRelationship } -func castNamespaceMap(o any) *NamespaceMap { - if o, ok := o.(AnyNamespaceMap); ok { - return o.asNamespaceMap() - } - return nil +// EpssVulnAssessmentRelationship Provides an EPSS assessment for a vulnerability. +type EpssVulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/EpssVulnAssessmentRelationship"` + VulnAssessmentRelationship + // Probability A probability score between 0 and 1 of a vulnerability being exploited. + Probability float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/probability" required:"true" type:"http://www.w3.org/2001/XMLSchema#decimal"` + // Percentile The percentile of the current probability score. + Percentile float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/percentile" required:"true" type:"http://www.w3.org/2001/XMLSchema#decimal"` } -func (o *NamespaceMap) asNamespaceMap() *NamespaceMap { +func (o *EpssVulnAssessmentRelationship) asEpssVulnAssessmentRelationship() *EpssVulnAssessmentRelationship { return o } -type AnyNamespaceMap interface { - asNamespaceMap() *NamespaceMap -} +type EpssVulnAssessmentRelationshipList []AnyEpssVulnAssessmentRelationship -type NamespaceMapList []AnyNamespaceMap +func (o *EpssVulnAssessmentRelationshipList) EpssVulnAssessmentRelationships() ld.TypeSeq[AnyEpssVulnAssessmentRelationship, *EpssVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castEpssVulnAssessmentRelationship) +} -func (o *NamespaceMapList) NamespaceMapIter() iter.Seq2[AnyNamespaceMap, *NamespaceMap] { - return typeIter(*o, castNamespaceMap) +// ExploitCatalogType Specifies the exploit catalog type. +type ExploitCatalogType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType"` + id string `iri:"@id"` } -// An SPDX version 2.X compatible verification method for software packages. -type PackageVerificationCode struct { - IntegrityMethod +// ExploitCatalogType_Kev CISA's Known Exploited Vulnerability (KEV) Catalog +var ExploitCatalogType_Kev = ExploitCatalogType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType/kev", +} - // Specifies the algorithm used for calculating the hash value. - Algorithm hashAlgorithm `iri:"https://spdx.org/rdf/3.0.1/terms/Core/algorithm" iri-compact:"algorithm"` - // The result of applying a hash algorithm to an Element. - HashValue string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/hashValue" iri-compact:"hashValue"` - // The relative file name of a file to be excluded from the - // `PackageVerificationCode`. - PackageVerificationCodeExcludedFiles []string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/packageVerificationCodeExcludedFile" iri-compact:"packageVerificationCodeExcludedFile"` +// ExploitCatalogType_Other Other exploit catalogs +var ExploitCatalogType_Other = ExploitCatalogType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType/other", } -func castPackageVerificationCode(o any) *PackageVerificationCode { - if o, ok := o.(AnyPackageVerificationCode); ok { - return o.asPackageVerificationCode() - } - return nil +type AnyExploitCatalogVulnAssessmentRelationship interface { + asExploitCatalogVulnAssessmentRelationship() *ExploitCatalogVulnAssessmentRelationship } -func (o *PackageVerificationCode) asPackageVerificationCode() *PackageVerificationCode { - return o +// ExploitCatalogVulnAssessmentRelationship Provides an exploit assessment of a vulnerability. +type ExploitCatalogVulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogVulnAssessmentRelationship"` + VulnAssessmentRelationship + // Locator Provides the location of an exploit catalog. + Locator ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Security/locator" required:"true" type:"http://www.w3.org/2001/XMLSchema#anyURI"` + // Exploited Describe that a CVE is known to have an exploit because it's been listed in an exploit catalog. + Exploited bool `iri:"https://spdx.org/rdf/3.0.1/terms/Security/exploited" required:"true" type:"http://www.w3.org/2001/XMLSchema#boolean"` + // CatalogType Specifies the exploit catalog type. + CatalogType ExploitCatalogType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/catalogType" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType"` } -type AnyPackageVerificationCode interface { - AnyIntegrityMethod - asPackageVerificationCode() *PackageVerificationCode +func (o *ExploitCatalogVulnAssessmentRelationship) asExploitCatalogVulnAssessmentRelationship() *ExploitCatalogVulnAssessmentRelationship { + return o } -type PackageVerificationCodeList []AnyPackageVerificationCode +type ExploitCatalogVulnAssessmentRelationshipList []AnyExploitCatalogVulnAssessmentRelationship -func (o *PackageVerificationCodeList) PackageVerificationCodeIter() iter.Seq2[AnyPackageVerificationCode, *PackageVerificationCode] { - return typeIter(*o, castPackageVerificationCode) +func (o *ExploitCatalogVulnAssessmentRelationshipList) ExploitCatalogVulnAssessmentRelationships() ld.TypeSeq[AnyExploitCatalogVulnAssessmentRelationship, *ExploitCatalogVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castExploitCatalogVulnAssessmentRelationship) } -// A tuple of two positive integers that define a range. -type PositiveIntegerRange struct { - ID string `iri:"@id"` - - // Defines the beginning of a range. - BeginIntegerRange int `iri:"https://spdx.org/rdf/3.0.1/terms/Core/beginIntegerRange" iri-compact:"beginIntegerRange"` - // Defines the end of a range. - EndIntegerRange int `iri:"https://spdx.org/rdf/3.0.1/terms/Core/endIntegerRange" iri-compact:"endIntegerRange"` +type AnyExtendableLicense interface { + asExtendableLicense() *ExtendableLicense } -func castPositiveIntegerRange(o any) *PositiveIntegerRange { - if o, ok := o.(AnyPositiveIntegerRange); ok { - return o.asPositiveIntegerRange() - } - return nil +// ExtendableLicense Abstract class representing a License or an OrLaterOperator. +type ExtendableLicense struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/ExtendableLicense"` + LicenseInfo } -func (o *PositiveIntegerRange) asPositiveIntegerRange() *PositiveIntegerRange { +func (o *ExtendableLicense) asExtendableLicense() *ExtendableLicense { return o } -type AnyPositiveIntegerRange interface { - asPositiveIntegerRange() *PositiveIntegerRange +type ExtendableLicenseList []AnyExtendableLicense + +func (o *ExtendableLicenseList) CustomLicenses() ld.TypeSeq[AnyExtendableLicense, *CustomLicense] { + return ld.NewTypeSeq(*o, castCustomLicense) } -type PositiveIntegerRangeList []AnyPositiveIntegerRange +func (o *ExtendableLicenseList) ExtendableLicenses() ld.TypeSeq[AnyExtendableLicense, *ExtendableLicense] { + return ld.NewTypeSeq(*o, castExtendableLicense) +} -func (o *PositiveIntegerRangeList) PositiveIntegerRangeIter() iter.Seq2[AnyPositiveIntegerRange, *PositiveIntegerRange] { - return typeIter(*o, castPositiveIntegerRange) +func (o *ExtendableLicenseList) Licenses() ld.TypeSeq[AnyExtendableLicense, *License] { + return ld.NewTypeSeq(*o, castLicense) } -// Categories of presence or absence. -type presenceType struct { - ID string `iri:"@id"` +func (o *ExtendableLicenseList) ListedLicenses() ld.TypeSeq[AnyExtendableLicense, *ListedLicense] { + return ld.NewTypeSeq(*o, castListedLicense) } -// Indicates absence of the field. -var PresenceType_No = presenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/no"} +func (o *ExtendableLicenseList) OrLaterOperators() ld.TypeSeq[AnyExtendableLicense, *OrLaterOperator] { + return ld.NewTypeSeq(*o, castOrLaterOperator) +} -// Makes no assertion about the field. -var PresenceType_NoAssertion = presenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/noAssertion"} +// Extension A characterization of some aspect of an Element that is associated with the Element in a generalized fashion. +type Extension struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/Extension"` + id string `iri:"@id"` +} +type AnyExternalIdentifier interface { + asExternalIdentifier() *ExternalIdentifier +} -// Indicates presence of the field. -var PresenceType_Yes = presenceType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/yes"} +// ExternalIdentifier A reference to a resource identifier defined outside the scope of SPDX-3.0 content that uniquely identifies an Element. +type ExternalIdentifier struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifier"` + ID string `iri:"@id"` + // Identifier Uniquely identifies an external element. + Identifier string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/identifier" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` + // IssuingAuthority An entity that is authorized to issue identification credentials. + IssuingAuthority string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/issuingAuthority" type:"http://www.w3.org/2001/XMLSchema#string"` + // Comment Provide consumers with comments by the creator of the Element about the\nElement. + Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" type:"http://www.w3.org/2001/XMLSchema#string"` + // IdentifierLocators Provides the location for more information regarding an external identifier. + IdentifierLocators []ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Core/identifierLocator" type:"http://www.w3.org/2001/XMLSchema#anyURI"` + // ExternalIdentifierType Specifies the type of the external identifier. + ExternalIdentifierType ExternalIdentifierType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalIdentifierType" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType"` +} -// Enumeration of the valid profiles. -type profileIdentifierType struct { - ID string `iri:"@id"` +func (o *ExternalIdentifier) asExternalIdentifier() *ExternalIdentifier { + return o } -// the element follows the AI profile specification -var ProfileIdentifierType_Ai = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/ai"} +type ExternalIdentifierList []AnyExternalIdentifier + +func (o *ExternalIdentifierList) ExternalIdentifiers() ld.TypeSeq[AnyExternalIdentifier, *ExternalIdentifier] { + return ld.NewTypeSeq(*o, castExternalIdentifier) +} -// the element follows the Build profile specification -var ProfileIdentifierType_Build = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/build"} +// ExternalIdentifierType Specifies the type of an external identifier. +type ExternalIdentifierType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType"` + id string `iri:"@id"` +} -// the element follows the Core profile specification -var ProfileIdentifierType_Core = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/core"} +// ExternalIdentifierType_Cpe22 [Common Platform Enumeration Specification 2.2](https://cpe.mitre.org/files/cpe-specification_2.2.pdf) +var ExternalIdentifierType_Cpe22 = ExternalIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cpe22", +} -// the element follows the Dataset profile specification -var ProfileIdentifierType_Dataset = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/dataset"} +// ExternalIdentifierType_Cpe23 [Common Platform Enumeration: Naming Specification Version 2.3](https://csrc.nist.gov/publications/detail/nistir/7695/final) +var ExternalIdentifierType_Cpe23 = ExternalIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cpe23", +} -// the element follows the ExpandedLicensing profile specification -var ProfileIdentifierType_ExpandedLicensing = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/expandedLicensing"} +// ExternalIdentifierType_Cve Common Vulnerabilities and Exposures identifiers, an identifier for a specific software flaw defined within the official CVE Dictionary and that conforms to the [CVE specification](https://csrc.nist.gov/glossary/term/cve_id). +var ExternalIdentifierType_Cve = ExternalIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/cve", +} -// the element follows the Extension profile specification -var ProfileIdentifierType_Extension = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/extension"} +// ExternalIdentifierType_Email Email address, as defined in [RFC 3696](https://datatracker.ietf.org/doc/rfc3986/) Section 3. +var ExternalIdentifierType_Email = ExternalIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/email", +} -// the element follows the Lite profile specification -var ProfileIdentifierType_Lite = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/lite"} +// ExternalIdentifierType_Gitoid [Gitoid](https://www.iana.org/assignments/uri-schemes/prov/gitoid), stands for [Git Object ID](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). A gitoid of type blob is a unique hash of a binary artifact. A gitoid may represent either an [Artifact Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-identifier-types) for the software artifact or an [Input Manifest Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#input-manifest-identifier) for the software artifact's associated [Artifact Input Manifest](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-input-manifest); this ambiguity exists because the Artifact Input Manifest is itself an artifact, and the gitoid of that artifact is its valid identifier. Gitoids calculated on software artifacts (Snippet, File, or Package Elements) should be recorded in the SPDX 3.0 SoftwareArtifact's contentIdentifier property. Gitoids calculated on the Artifact Input Manifest (Input Manifest Identifier) should be recorded in the SPDX 3.0 Element's externalIdentifier property. See [OmniBOR Specification](https://github.com/omnibor/spec/), a minimalistic specification for describing software [Artifact Dependency Graphs](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-dependency-graph-adg). +var ExternalIdentifierType_Gitoid = ExternalIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/gitoid", +} -// the element follows the Security profile specification -var ProfileIdentifierType_Security = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/security"} +// ExternalIdentifierType_Other Used when the type does not match any of the other options. +var ExternalIdentifierType_Other = ExternalIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/other", +} -// the element follows the SimpleLicensing profile specification -var ProfileIdentifierType_SimpleLicensing = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/simpleLicensing"} +// ExternalIdentifierType_PackageUrl Package URL, as defined in the corresponding [Annex](../../../annexes/pkg-url-specification.md) of this specification. +var ExternalIdentifierType_PackageUrl = ExternalIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/packageUrl", +} -// the element follows the Software profile specification -var ProfileIdentifierType_Software = profileIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/software"} +// ExternalIdentifierType_SecurityOther Used when there is a security related identifier of unspecified type. +var ExternalIdentifierType_SecurityOther = ExternalIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/securityOther", +} -// Describes a relationship between one or more elements. -type Relationship struct { - Element +// ExternalIdentifierType_Swhid SoftWare Hash IDentifier, a persistent intrinsic identifier for digital artifacts, such as files, trees (also known as directories or folders), commits, and other objects typically found in version control systems. The format of the identifiers is defined in the [SWHID specification](https://www.swhid.org/specification/v1.1/4.Syntax) (ISO/IEC DIS 18670). They typically look like `swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2`. +var ExternalIdentifierType_Swhid = ExternalIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/swhid", +} - // Provides information about the completeness of relationships. - Completeness relationshipCompleteness `iri:"https://spdx.org/rdf/3.0.1/terms/Core/completeness" iri-compact:"completeness"` - // Specifies the time from which an element is no longer applicable / valid. - EndTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/endTime" iri-compact:"endTime"` - // References the Element on the left-hand side of a relationship. - From AnyElement `iri:"https://spdx.org/rdf/3.0.1/terms/Core/from" iri-compact:"from"` +// ExternalIdentifierType_Swid Concise Software Identification (CoSWID) tag, as defined in [RFC 9393](https://datatracker.ietf.org/doc/rfc9393/) Section 2.3. +var ExternalIdentifierType_Swid = ExternalIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/swid", +} - // Information about the relationship between two Elements. - RelationshipType relationshipType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/relationshipType" iri-compact:"relationshipType"` - // Specifies the time from which an element is applicable / valid. - StartTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/startTime" iri-compact:"startTime"` - // References an Element on the right-hand side of a relationship. - Tos ElementList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/to" iri-compact:"to"` +// ExternalIdentifierType_UrlScheme [Uniform Resource Identifier (URI) Schemes](https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml). The scheme used in order to locate a resource. +var ExternalIdentifierType_UrlScheme = ExternalIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/urlScheme", } -func castRelationship(o any) *Relationship { - if o, ok := o.(AnyRelationship); ok { - return o.asRelationship() - } - return nil +type AnyExternalMap interface { + asExternalMap() *ExternalMap } -func (o *Relationship) asRelationship() *Relationship { - return o +// ExternalMap A map of Element identifiers that are used within an SpdxDocument but defined\nexternal to that SpdxDocument. +type ExternalMap struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/ExternalMap"` + ID string `iri:"@id"` + // ExternalSpdxId Identifies an external Element used within an SpdxDocument but defined\nexternal to that SpdxDocument. + ExternalSpdxId ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalSpdxId" required:"true" type:"http://www.w3.org/2001/XMLSchema#anyURI"` + // LocationHint Provides an indication of where to retrieve an external Element. + LocationHint ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Core/locationHint" type:"http://www.w3.org/2001/XMLSchema#anyURI"` + // VerifiedUsings Provides an IntegrityMethod with which the integrity of an Element can be\nasserted. + VerifiedUsings IntegrityMethodList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/verifiedUsing" type:"https://spdx.org/rdf/3.0.1/terms/Core/IntegrityMethod"` + // DefiningArtifact Artifact representing a serialization instance of SPDX data containing the\ndefinition of a particular Element. + DefiningArtifact AnyArtifact `iri:"https://spdx.org/rdf/3.0.1/terms/Core/definingArtifact" type:"https://spdx.org/rdf/3.0.1/terms/Core/Artifact"` } -type AnyRelationship interface { - AnyElement - asRelationship() *Relationship +func (o *ExternalMap) asExternalMap() *ExternalMap { + return o } -type RelationshipList []AnyRelationship +type ExternalMapList []AnyExternalMap -func (o *RelationshipList) RelationshipIter() iter.Seq2[AnyRelationship, *Relationship] { - return typeIter(*o, castRelationship) +func (o *ExternalMapList) ExternalMaps() ld.TypeSeq[AnyExternalMap, *ExternalMap] { + return ld.NewTypeSeq(*o, castExternalMap) } -func (o *RelationshipList) SecurityVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVulnAssessmentRelationship) + +type AnyExternalRef interface { + asExternalRef() *ExternalRef } -func (o *RelationshipList) LifecycleScopedRelationshipIter() iter.Seq2[AnyRelationship, *LifecycleScopedRelationship] { - return typeIter(*o, castLifecycleScopedRelationship) + +// ExternalRef A reference to a resource outside the scope of SPDX-3.0 content related to an Element. +type ExternalRef struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/ExternalRef"` + ID string `iri:"@id"` + // Locators Provides the location of an external reference. + Locators []string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/locator" type:"http://www.w3.org/2001/XMLSchema#string"` + // ContentType Provides information about the content type of an Element or a Property. + ContentType string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/contentType" type:"http://www.w3.org/2001/XMLSchema#string"` + // ExternalRefType Specifies the type of the external reference. + ExternalRefType ExternalRefType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalRefType" type:"https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType"` + // Comment Provide consumers with comments by the creator of the Element about the\nElement. + Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" type:"http://www.w3.org/2001/XMLSchema#string"` } -func (o *RelationshipList) SecurityCvssV2VulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityCvssV2VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV2VulnAssessmentRelationship) + +func (o *ExternalRef) asExternalRef() *ExternalRef { + return o } -func (o *RelationshipList) SecurityCvssV3VulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityCvssV3VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV3VulnAssessmentRelationship) + +type ExternalRefList []AnyExternalRef + +func (o *ExternalRefList) ExternalRefs() ld.TypeSeq[AnyExternalRef, *ExternalRef] { + return ld.NewTypeSeq(*o, castExternalRef) } -func (o *RelationshipList) SecurityCvssV4VulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityCvssV4VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV4VulnAssessmentRelationship) + +// ExternalRefType Specifies the type of an external reference. +type ExternalRefType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType"` + id string `iri:"@id"` } -func (o *RelationshipList) SecurityEpssVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityEpssVulnAssessmentRelationship] { - return typeIter(*o, castSecurityEpssVulnAssessmentRelationship) + +// ExternalRefType_AltDownloadLocation A reference to an alternative download location. +var ExternalRefType_AltDownloadLocation = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/altDownloadLocation", } -func (o *RelationshipList) SecurityExploitCatalogVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityExploitCatalogVulnAssessmentRelationship] { - return typeIter(*o, castSecurityExploitCatalogVulnAssessmentRelationship) + +// ExternalRefType_AltWebPage A reference to an alternative web page. +var ExternalRefType_AltWebPage = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/altWebPage", } -func (o *RelationshipList) SecuritySsvcVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecuritySsvcVulnAssessmentRelationship] { - return typeIter(*o, castSecuritySsvcVulnAssessmentRelationship) + +// ExternalRefType_BinaryArtifact A reference to binary artifacts related to a package. +var ExternalRefType_BinaryArtifact = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/binaryArtifact", } -func (o *RelationshipList) SecurityVexVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVexVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexVulnAssessmentRelationship) + +// ExternalRefType_Bower A reference to a Bower package. The package locator format, looks like `package#version`, is defined in the \"install\" section of [Bower API documentation](https://bower.io/docs/api/#install). +var ExternalRefType_Bower = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/bower", } -func (o *RelationshipList) SecurityVexAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVexAffectedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexAffectedVulnAssessmentRelationship) + +// ExternalRefType_BuildMeta A reference build metadata related to a published package. +var ExternalRefType_BuildMeta = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/buildMeta", } -func (o *RelationshipList) SecurityVexFixedVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVexFixedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexFixedVulnAssessmentRelationship) + +// ExternalRefType_BuildSystem A reference build system used to create or publish the package. +var ExternalRefType_BuildSystem = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/buildSystem", } -func (o *RelationshipList) SecurityVexNotAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVexNotAffectedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexNotAffectedVulnAssessmentRelationship) + +// ExternalRefType_CertificationReport A reference to a certification report for a package from an accredited/independent body. +var ExternalRefType_CertificationReport = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/certificationReport", } -func (o *RelationshipList) SecurityVexUnderInvestigationVulnAssessmentRelationshipIter() iter.Seq2[AnyRelationship, *SecurityVexUnderInvestigationVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexUnderInvestigationVulnAssessmentRelationship) + +// ExternalRefType_Chat A reference to the instant messaging system used by the maintainer for a package. +var ExternalRefType_Chat = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/chat", } -// Indicates whether a relationship is known to be complete, incomplete, or if no assertion is made with respect to relationship completeness. -type relationshipCompleteness struct { - ID string `iri:"@id"` +// ExternalRefType_ComponentAnalysisReport A reference to a Software Composition Analysis (SCA) report. +var ExternalRefType_ComponentAnalysisReport = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/componentAnalysisReport", } -// The relationship is known to be exhaustive. -var RelationshipCompleteness_Complete = relationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/complete"} +// ExternalRefType_Cwe [Common Weakness Enumeration](https://csrc.nist.gov/glossary/term/common_weakness_enumeration). A reference to a source of software flaw defined within the official [CWE List](https://cwe.mitre.org/data/) that conforms to the [CWE specification](https://cwe.mitre.org/). +var ExternalRefType_Cwe = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/cwe", +} -// The relationship is known not to be exhaustive. -var RelationshipCompleteness_Incomplete = relationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/incomplete"} +// ExternalRefType_Documentation A reference to the documentation for a package. +var ExternalRefType_Documentation = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/documentation", +} -// No assertion can be made about the completeness of the relationship. -var RelationshipCompleteness_NoAssertion = relationshipCompleteness{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/noAssertion"} +// ExternalRefType_DynamicAnalysisReport A reference to a dynamic analysis report for a package. +var ExternalRefType_DynamicAnalysisReport = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/dynamicAnalysisReport", +} -// Information about the relationship between two Elements. -type relationshipType struct { - ID string `iri:"@id"` +// ExternalRefType_EolNotice A reference to the End Of Sale (EOS) and/or End Of Life (EOL) information related to a package. +var ExternalRefType_EolNotice = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/eolNotice", } -// The `from` Vulnerability affects each `to` Element. The use of the `affects` type is constrained to `VexAffectedVulnAssessmentRelationship` classed relationships. -var RelationshipType_Affects = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/affects"} +// ExternalRefType_ExportControlAssessment A reference to a export control assessment for a package. +var ExternalRefType_ExportControlAssessment = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/exportControlAssessment", +} -// The `from` Element is amended by each `to` Element. -var RelationshipType_AmendedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/amendedBy"} +// ExternalRefType_Funding A reference to funding information related to a package. +var ExternalRefType_Funding = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/funding", +} -// The `from` Element is an ancestor of each `to` Element. -var RelationshipType_AncestorOf = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/ancestorOf"} +// ExternalRefType_IssueTracker A reference to the issue tracker for a package. +var ExternalRefType_IssueTracker = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/issueTracker", +} -// The `from` Element is available from the additional supplier described by each `to` Element. -var RelationshipType_AvailableFrom = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/availableFrom"} +// ExternalRefType_License A reference to additional license information related to an artifact. +var ExternalRefType_License = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/license", +} -// The `from` Element is a configuration applied to each `to` Element, during a LifecycleScopeType period. -var RelationshipType_Configures = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/configures"} +// ExternalRefType_MailingList A reference to the mailing list used by the maintainer for a package. +var ExternalRefType_MailingList = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/mailingList", +} -// The `from` Element contains each `to` Element. -var RelationshipType_Contains = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/contains"} +// ExternalRefType_MavenCentral A reference to a Maven repository artifact. The artifact locator format is defined in the [Maven documentation](https://maven.apache.org/guides/mini/guide-naming-conventions.html) and looks like `groupId:artifactId[:version]`. +var ExternalRefType_MavenCentral = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/mavenCentral", +} -// The `from` Vulnerability is coordinatedBy the `to` Agent(s) (vendor, researcher, or consumer agent). -var RelationshipType_CoordinatedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/coordinatedBy"} +// ExternalRefType_Metrics A reference to metrics related to package such as OpenSSF scorecards. +var ExternalRefType_Metrics = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/metrics", +} -// The `from` Element has been copied to each `to` Element. -var RelationshipType_CopiedTo = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/copiedTo"} +// ExternalRefType_Npm A reference to an npm package. The package locator format is defined in the [npm documentation](https://docs.npmjs.com/cli/v10/configuring-npm/package-json) and looks like `package@version`. +var ExternalRefType_Npm = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/npm", +} -// The `from` Agent is delegating an action to the Agent of the `to` Relationship (which must be of type invokedBy), during a LifecycleScopeType (e.g. the `to` invokedBy Relationship is being done on behalf of `from`). -var RelationshipType_DelegatedTo = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/delegatedTo"} +// ExternalRefType_Nuget A reference to a NuGet package. The package locator format is defined in the [NuGet documentation](https://docs.nuget.org) and looks like `package/version`. +var ExternalRefType_Nuget = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/nuget", +} -// The `from` Element depends on each `to` Element, during a LifecycleScopeType period. -var RelationshipType_DependsOn = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/dependsOn"} +// ExternalRefType_Other Used when the type does not match any of the other options. +var ExternalRefType_Other = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/other", +} -// The `from` Element is a descendant of each `to` Element. -var RelationshipType_DescendantOf = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/descendantOf"} +// ExternalRefType_PrivacyAssessment A reference to a privacy assessment for a package. +var ExternalRefType_PrivacyAssessment = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/privacyAssessment", +} -// The `from` Element describes each `to` Element. To denote the root(s) of a tree of elements in a collection, the rootElement property should be used. -var RelationshipType_Describes = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/describes"} +// ExternalRefType_ProductMetadata A reference to additional product metadata such as reference within organization's product catalog. +var ExternalRefType_ProductMetadata = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/productMetadata", +} -// The `from` Vulnerability has no impact on each `to` Element. The use of the `doesNotAffect` is constrained to `VexNotAffectedVulnAssessmentRelationship` classed relationships. -var RelationshipType_DoesNotAffect = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/doesNotAffect"} +// ExternalRefType_PurchaseOrder A reference to a purchase order for a package. +var ExternalRefType_PurchaseOrder = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/purchaseOrder", +} -// The `from` archive expands out as an artifact described by each `to` Element. -var RelationshipType_ExpandsTo = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/expandsTo"} +// ExternalRefType_QualityAssessmentReport A reference to a quality assessment for a package. +var ExternalRefType_QualityAssessmentReport = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/qualityAssessmentReport", +} -// The `from` Vulnerability has had an exploit created against it by each `to` Agent. -var RelationshipType_ExploitCreatedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/exploitCreatedBy"} +// ExternalRefType_ReleaseHistory A reference to a published list of releases for a package. +var ExternalRefType_ReleaseHistory = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/releaseHistory", +} -// Designates a `from` Vulnerability has been fixed by the `to` Agent(s). -var RelationshipType_FixedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/fixedBy"} +// ExternalRefType_ReleaseNotes A reference to the release notes for a package. +var ExternalRefType_ReleaseNotes = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/releaseNotes", +} -// A `from` Vulnerability has been fixed in each `to` Element. The use of the `fixedIn` type is constrained to `VexFixedVulnAssessmentRelationship` classed relationships. -var RelationshipType_FixedIn = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/fixedIn"} +// ExternalRefType_RiskAssessment A reference to a risk assessment for a package. +var ExternalRefType_RiskAssessment = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/riskAssessment", +} -// Designates a `from` Vulnerability was originally discovered by the `to` Agent(s). -var RelationshipType_FoundBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/foundBy"} +// ExternalRefType_RuntimeAnalysisReport A reference to a runtime analysis report for a package. +var ExternalRefType_RuntimeAnalysisReport = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/runtimeAnalysisReport", +} -// The `from` Element generates each `to` Element. -var RelationshipType_Generates = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/generates"} +// ExternalRefType_SecureSoftwareAttestation A reference to information assuring that the software is developed using security practices as defined by [NIST SP 800-218 Secure Software Development Framework (SSDF) Version 1.1](https://csrc.nist.gov/pubs/sp/800/218/final) or [CISA Secure Software Development Attestation Form](https://www.cisa.gov/resources-tools/resources/secure-software-development-attestation-form). +var ExternalRefType_SecureSoftwareAttestation = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/secureSoftwareAttestation", +} -// Every `to` Element is a file added to the `from` Element (`from` hasAddedFile `to`). -var RelationshipType_HasAddedFile = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAddedFile"} +// ExternalRefType_SecurityAdversaryModel A reference to the security adversary model for a package. +var ExternalRefType_SecurityAdversaryModel = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityAdversaryModel", +} -// Relates a `from` Vulnerability and each `to` Element with a security assessment. To be used with `VulnAssessmentRelationship` types. -var RelationshipType_HasAssessmentFor = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAssessmentFor"} +// ExternalRefType_SecurityAdvisory A reference to a published security advisory (where advisory as defined per [ISO 29147:2018](https://www.iso.org/standard/72311.html)) that may affect one or more elements, e.g., vendor advisories or specific NVD entries. +var ExternalRefType_SecurityAdvisory = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityAdvisory", +} -// Used to associate a `from` Artifact with each `to` Vulnerability. -var RelationshipType_HasAssociatedVulnerability = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAssociatedVulnerability"} +// ExternalRefType_SecurityFix A reference to the patch or source code that fixes a vulnerability. +var ExternalRefType_SecurityFix = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityFix", +} -// The `from` SoftwareArtifact is concluded by the SPDX data creator to be governed by each `to` license. -var RelationshipType_HasConcludedLicense = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasConcludedLicense"} +// ExternalRefType_SecurityOther A reference to related security information of unspecified type. +var ExternalRefType_SecurityOther = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityOther", +} -// The `from` Element treats each `to` Element as a data file. A data file is an artifact that stores data required or optional for the `from` Element's functionality. A data file can be a database file, an index file, a log file, an AI model file, a calibration data file, a temporary file, a backup file, and more. For AI training dataset, test dataset, test artifact, configuration data, build input data, and build output data, please consider using the more specific relationship types: `trainedOn`, `testedOn`, `hasTest`, `configures`, `hasInput`, and `hasOutput`, respectively. This relationship does not imply dependency. -var RelationshipType_HasDataFile = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDataFile"} +// ExternalRefType_SecurityPenTestReport A reference to a [penetration test](https://en.wikipedia.org/wiki/Penetration_test) report for a package. +var ExternalRefType_SecurityPenTestReport = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityPenTestReport", +} -// The `from` SoftwareArtifact was discovered to actually contain each `to` license, for example as detected by use of automated tooling. -var RelationshipType_HasDeclaredLicense = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDeclaredLicense"} +// ExternalRefType_SecurityPolicy A reference to instructions for reporting newly discovered security vulnerabilities for a package. +var ExternalRefType_SecurityPolicy = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityPolicy", +} -// Every `to` Element is a file deleted from the `from` Element (`from` hasDeletedFile `to`). -var RelationshipType_HasDeletedFile = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDeletedFile"} +// ExternalRefType_SecurityThreatModel A reference the [security threat model](https://en.wikipedia.org/wiki/Threat_model) for a package. +var ExternalRefType_SecurityThreatModel = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/securityThreatModel", +} -// The `from` Element has manifest files that contain dependency information in each `to` Element. -var RelationshipType_HasDependencyManifest = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDependencyManifest"} +// ExternalRefType_SocialMedia A reference to a social media channel for a package. +var ExternalRefType_SocialMedia = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/socialMedia", +} -// The `from` Element is distributed as an artifact in each `to` Element (e.g. an RPM or archive file). -var RelationshipType_HasDistributionArtifact = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDistributionArtifact"} +// ExternalRefType_SourceArtifact A reference to an artifact containing the sources for a package. +var ExternalRefType_SourceArtifact = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/sourceArtifact", +} -// The `from` Element is documented by each `to` Element. -var RelationshipType_HasDocumentation = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDocumentation"} +// ExternalRefType_StaticAnalysisReport A reference to a static analysis report for a package. +var ExternalRefType_StaticAnalysisReport = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/staticAnalysisReport", +} -// The `from` Element dynamically links in each `to` Element, during a LifecycleScopeType period. -var RelationshipType_HasDynamicLink = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDynamicLink"} +// ExternalRefType_Support A reference to the software support channel or other support information for a package. +var ExternalRefType_Support = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/support", +} -// Every `to` Element is considered as evidence for the `from` Element (`from` hasEvidence `to`). -var RelationshipType_HasEvidence = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasEvidence"} +// ExternalRefType_Vcs A reference to a version control system related to a software artifact. +var ExternalRefType_Vcs = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vcs", +} -// Every `to` Element is an example for the `from` Element (`from` hasExample `to`). -var RelationshipType_HasExample = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasExample"} +// ExternalRefType_VulnerabilityDisclosureReport A reference to a Vulnerability Disclosure Report (VDR) which provides the software supplier's analysis and findings describing the impact (or lack of impact) that reported vulnerabilities have on packages or products in the supplier's SBOM as defined in [NIST SP 800-161 Cybersecurity Supply Chain Risk Management Practices for Systems and Organizations](https://csrc.nist.gov/pubs/sp/800/161/r1/final). +var ExternalRefType_VulnerabilityDisclosureReport = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vulnerabilityDisclosureReport", +} -// The `from` Build was run on the `to` Element during a LifecycleScopeType period (e.g. the host that the build runs on). -var RelationshipType_HasHost = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasHost"} +// ExternalRefType_VulnerabilityExploitabilityAssessment A reference to a Vulnerability Exploitability eXchange (VEX) statement which provides information on whether a product is impacted by a specific vulnerability in an included package and, if affected, whether there are actions recommended to remediate. See also [NTIA VEX one-page summary](https://ntia.gov/files/ntia/publications/vex_one-page_summary.pdf). +var ExternalRefType_VulnerabilityExploitabilityAssessment = ExternalRefType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/vulnerabilityExploitabilityAssessment", +} -// The `from` Build has each `to` Element as an input, during a LifecycleScopeType period. -var RelationshipType_HasInput = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasInput"} +type AnyFile interface { + asFile() *File +} -// Every `to` Element is metadata about the `from` Element (`from` hasMetadata `to`). -var RelationshipType_HasMetadata = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasMetadata"} +// File Refers to any object that stores content on a computer. +type File struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Software/File"` + SoftwareArtifact + // ContentType Provides information about the content type of an Element or a Property. + ContentType string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/contentType" type:"http://www.w3.org/2001/XMLSchema#string"` + // FileKind Describes if a given file is a directory or non-directory kind of file. + FileKind FileKindType `iri:"https://spdx.org/rdf/3.0.1/terms/Software/fileKind" type:"https://spdx.org/rdf/3.0.1/terms/Software/FileKindType"` +} -// Every `to` Element is an optional component of the `from` Element (`from` hasOptionalComponent `to`). -var RelationshipType_HasOptionalComponent = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOptionalComponent"} +func (o *File) asFile() *File { + return o +} -// The `from` Element optionally depends on each `to` Element, during a LifecycleScopeType period. -var RelationshipType_HasOptionalDependency = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOptionalDependency"} +type FileList []AnyFile -// The `from` Build element generates each `to` Element as an output, during a LifecycleScopeType period. -var RelationshipType_HasOutput = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOutput"} +func (o *FileList) Files() ld.TypeSeq[AnyFile, *File] { + return ld.NewTypeSeq(*o, castFile) +} -// The `from` Element has a prerequisite on each `to` Element, during a LifecycleScopeType period. -var RelationshipType_HasPrerequisite = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasPrerequisite"} +// FileKindType Enumeration of the different kinds of SPDX file. +type FileKindType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Software/FileKindType"` + id string `iri:"@id"` +} -// The `from` Element has a dependency on each `to` Element, dependency is not in the distributed artifact, but assumed to be provided, during a LifecycleScopeType period. -var RelationshipType_HasProvidedDependency = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasProvidedDependency"} +// FileKindType_Directory The file represents a directory and all content stored in that directory. +var FileKindType_Directory = FileKindType{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType/directory", +} -// The `from` Element has a requirement on each `to` Element, during a LifecycleScopeType period. -var RelationshipType_HasRequirement = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasRequirement"} +// FileKindType_File The file represents a single file (default). +var FileKindType_File = FileKindType{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType/file", +} -// Every `to` Element is a specification for the `from` Element (`from` hasSpecification `to`), during a LifecycleScopeType period. -var RelationshipType_HasSpecification = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasSpecification"} +type AnyHash interface { + asHash() *Hash +} -// The `from` Element statically links in each `to` Element, during a LifecycleScopeType period. -var RelationshipType_HasStaticLink = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasStaticLink"} +// Hash A mathematically calculated representation of a grouping of data. +type Hash struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/Hash"` + IntegrityMethod + // HashValue The result of applying a hash algorithm to an Element. + HashValue string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/hashValue" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` + // Algorithm Specifies the algorithm used for calculating the hash value. + Algorithm HashAlgorithm `iri:"https://spdx.org/rdf/3.0.1/terms/Core/algorithm" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm"` +} -// Every `to` Element is a test artifact for the `from` Element (`from` hasTest `to`), during a LifecycleScopeType period. -var RelationshipType_HasTest = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasTest"} +func (o *Hash) asHash() *Hash { + return o +} -// Every `to` Element is a test case for the `from` Element (`from` hasTestCase `to`). -var RelationshipType_HasTestCase = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasTestCase"} +type HashList []AnyHash -// Every `to` Element is a variant the `from` Element (`from` hasVariant `to`). -var RelationshipType_HasVariant = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasVariant"} +func (o *HashList) Hashes() ld.TypeSeq[AnyHash, *Hash] { + return ld.NewTypeSeq(*o, castHash) +} -// The `from` Element was invoked by the `to` Agent, during a LifecycleScopeType period (for example, a Build element that describes a build step). -var RelationshipType_InvokedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/invokedBy"} +// HashAlgorithm A mathematical algorithm that maps data of arbitrary size to a bit string. +type HashAlgorithm struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm"` + id string `iri:"@id"` +} -// The `from` Element is modified by each `to` Element. -var RelationshipType_ModifiedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/modifiedBy"} +// HashAlgorithm_Adler32 Adler-32 checksum is part of the widely used zlib compression library as defined in [RFC 1950](https://datatracker.ietf.org/doc/rfc1950/) Section 2.3. +var HashAlgorithm_Adler32 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/adler32", +} -// Every `to` Element is related to the `from` Element where the relationship type is not described by any of the SPDX relationship types (this relationship is directionless). -var RelationshipType_Other = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/other"} +// HashAlgorithm_Blake2b256 BLAKE2b algorithm with a digest size of 256, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. +var HashAlgorithm_Blake2b256 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b256", +} -// Every `to` Element is a packaged instance of the `from` Element (`from` packagedBy `to`). -var RelationshipType_PackagedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/packagedBy"} +// HashAlgorithm_Blake2b384 BLAKE2b algorithm with a digest size of 384, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. +var HashAlgorithm_Blake2b384 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b384", +} -// Every `to` Element is a patch for the `from` Element (`from` patchedBy `to`). -var RelationshipType_PatchedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/patchedBy"} +// HashAlgorithm_Blake2b512 BLAKE2b algorithm with a digest size of 512, as defined in [RFC 7693](https://datatracker.ietf.org/doc/rfc7693/) Section 4. +var HashAlgorithm_Blake2b512 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake2b512", +} -// Designates a `from` Vulnerability was made available for public use or reference by each `to` Agent. -var RelationshipType_PublishedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/publishedBy"} +// HashAlgorithm_Blake3 [BLAKE3](https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf) +var HashAlgorithm_Blake3 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/blake3", +} -// Designates a `from` Vulnerability was first reported to a project, vendor, or tracking database for formal identification by each `to` Agent. -var RelationshipType_ReportedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/reportedBy"} +// HashAlgorithm_CrystalsDilithium [Dilithium](https://pq-crystals.org/dilithium/) +var HashAlgorithm_CrystalsDilithium = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/crystalsDilithium", +} -// Designates a `from` Vulnerability's details were tracked, aggregated, and/or enriched to improve context (i.e. NVD) by each `to` Agent. -var RelationshipType_RepublishedBy = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/republishedBy"} +// HashAlgorithm_CrystalsKyber [Kyber](https://pq-crystals.org/kyber/) +var HashAlgorithm_CrystalsKyber = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/crystalsKyber", +} -// The `from` SpdxDocument can be found in a serialized form in each `to` Artifact. -var RelationshipType_SerializedInArtifact = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/serializedInArtifact"} +// HashAlgorithm_Falcon [FALCON](https://falcon-sign.info/falcon.pdf) +var HashAlgorithm_Falcon = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/falcon", +} -// The `from` Element has been tested on the `to` Element(s). -var RelationshipType_TestedOn = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/testedOn"} +// HashAlgorithm_Md2 MD2 message-digest algorithm, as defined in [RFC 1319](https://datatracker.ietf.org/doc/rfc1319/). +var HashAlgorithm_Md2 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md2", +} -// The `from` Element has been trained on the `to` Element(s). -var RelationshipType_TrainedOn = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/trainedOn"} +// HashAlgorithm_Md4 MD4 message-digest algorithm, as defined in [RFC 1186](https://datatracker.ietf.org/doc/rfc1186/). +var HashAlgorithm_Md4 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md4", +} -// The `from` Vulnerability impact is being investigated for each `to` Element. The use of the `underInvestigationFor` type is constrained to `VexUnderInvestigationVulnAssessmentRelationship` classed relationships. -var RelationshipType_UnderInvestigationFor = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/underInvestigationFor"} +// HashAlgorithm_Md5 MD5 message-digest algorithm, as defined in [RFC 1321](https://datatracker.ietf.org/doc/rfc1321/). +var HashAlgorithm_Md5 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md5", +} -// The `from` Element uses each `to` Element as a tool, during a LifecycleScopeType period. -var RelationshipType_UsesTool = relationshipType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/usesTool"} +// HashAlgorithm_Md6 [MD6 hash function](https://people.csail.mit.edu/rivest/pubs/RABCx08.pdf) +var HashAlgorithm_Md6 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/md6", +} -// A collection of SPDX Elements that could potentially be serialized. -type SpdxDocument struct { - ElementCollection +// HashAlgorithm_Other any hashing algorithm that does not exist in this list of entries +var HashAlgorithm_Other = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/other", +} - // Provides the license under which the SPDX documentation of the Element can be - // used. - DataLicense AnySimplelicensingAnyLicenseInfo `iri:"https://spdx.org/rdf/3.0.1/terms/Core/dataLicense" iri-compact:"dataLicense"` +// HashAlgorithm_Sha1 SHA-1, a secure hashing algorithm, as defined in [RFC 3174](https://datatracker.ietf.org/doc/rfc3174/). +var HashAlgorithm_Sha1 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha1", +} - // Provides an ExternalMap of Element identifiers. - Imports ExternalMapList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/import" iri-compact:"import"` +// HashAlgorithm_Sha224 SHA-2 with a digest length of 224, as defined in [RFC 3874](https://datatracker.ietf.org/doc/rfc3874/). +var HashAlgorithm_Sha224 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha224", +} - // Provides a NamespaceMap of prefixes and associated namespace partial URIs applicable to an SpdxDocument and independent of any specific serialization format or instance. - NamespaceMaps NamespaceMapList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/namespaceMap" iri-compact:"namespaceMap"` +// HashAlgorithm_Sha256 SHA-2 with a digest length of 256, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). +var HashAlgorithm_Sha256 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha256", } -func castSpdxDocument(o any) *SpdxDocument { - if o, ok := o.(AnySpdxDocument); ok { - return o.asSpdxDocument() - } - return nil +// HashAlgorithm_Sha384 SHA-2 with a digest length of 384, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). +var HashAlgorithm_Sha384 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha384", } -func (o *SpdxDocument) asSpdxDocument() *SpdxDocument { - return o +// HashAlgorithm_Sha3_224 SHA-3 with a digest length of 224, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). +var HashAlgorithm_Sha3_224 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_224", } -type AnySpdxDocument interface { - AnyElementCollection - asSpdxDocument() *SpdxDocument +// HashAlgorithm_Sha3_256 SHA-3 with a digest length of 256, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). +var HashAlgorithm_Sha3_256 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_256", } -type SpdxDocumentList []AnySpdxDocument +// HashAlgorithm_Sha3_384 SHA-3 with a digest length of 384, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). +var HashAlgorithm_Sha3_384 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_384", +} -func (o *SpdxDocumentList) SpdxDocumentIter() iter.Seq2[AnySpdxDocument, *SpdxDocument] { - return typeIter(*o, castSpdxDocument) +// HashAlgorithm_Sha3_512 SHA-3 with a digest length of 512, as defined in [FIPS 202](https://csrc.nist.gov/pubs/fips/202/final). +var HashAlgorithm_Sha3_512 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha3_512", } -// Indicates the type of support that is associated with an artifact. -type supportType struct { - ID string `iri:"@id"` +// HashAlgorithm_Sha512 SHA-2 with a digest length of 512, as defined in [RFC 6234](https://datatracker.ietf.org/doc/rfc6234/). +var HashAlgorithm_Sha512 = HashAlgorithm{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/sha512", } -// in addition to being supported by the supplier, the software is known to have been deployed and is in use. For a software as a service provider, this implies the software is now available as a service. -var SupportType_Deployed = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/deployed"} +type AnyIndividualElement interface { + asIndividualElement() *IndividualElement +} -// the artifact is in active development and is not considered ready for formal support from the supplier. -var SupportType_Development = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/development"} +// IndividualElement A concrete subclass of Element used by Individuals in the\nCore profile. +type IndividualElement struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/IndividualElement"` + Element +} -// there is a defined end of support for the artifact from the supplier. This may also be referred to as end of life. There is a validUntilDate that can be used to signal when support ends for the artifact. -var SupportType_EndOfSupport = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/endOfSupport"} +func (o *IndividualElement) asIndividualElement() *IndividualElement { + return o +} -// the artifact has been released, and there is limited support available from the supplier. There is a validUntilDate that can provide additional information about the duration of support. -var SupportType_LimitedSupport = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/limitedSupport"} +// IndividualElement_NoAssertionElement An Individual Value for Element representing a set of Elements of unknown\nidentify or cardinality (number). +var IndividualElement_NoAssertionElement AnyIndividualElement = &ExternalIRI{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/NoAssertionElement", +} -// no assertion about the type of support is made. This is considered the default if no other support type is used. -var SupportType_NoAssertion = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/noAssertion"} +// IndividualElement_NoneElement An Individual Value for Element representing a set of Elements with\ncardinality (number/count) of zero. +var IndividualElement_NoneElement AnyIndividualElement = &ExternalIRI{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/NoneElement", +} -// there is no support for the artifact from the supplier, consumer assumes any support obligations. -var SupportType_NoSupport = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/noSupport"} +type IndividualElementList []AnyIndividualElement -// the artifact has been released, and is supported from the supplier. There is a validUntilDate that can provide additional information about the duration of support. -var SupportType_Support = supportType{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/support"} +func (o *IndividualElementList) IndividualElements() ld.TypeSeq[AnyIndividualElement, *IndividualElement] { + return ld.NewTypeSeq(*o, castIndividualElement) +} -// An element of hardware and/or software utilized to carry out a particular function. -type Tool struct { - Element +type AnyIndividualLicensingInfo interface { + asIndividualLicensingInfo() *IndividualLicensingInfo } -func castTool(o any) *Tool { - if o, ok := o.(AnyTool); ok { - return o.asTool() - } - return nil +// IndividualLicensingInfo A concrete subclass of AnyLicenseInfo used by Individuals in the\nExpandedLicensing profile. +type IndividualLicensingInfo struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/IndividualLicensingInfo"` + LicenseInfo } -func (o *Tool) asTool() *Tool { +func (o *IndividualLicensingInfo) asIndividualLicensingInfo() *IndividualLicensingInfo { return o } -type AnyTool interface { - AnyElement - asTool() *Tool +// IndividualLicensingInfo_NoAssertionLicense An Individual Value for License when no assertion can be made about its actual\nvalue. +var IndividualLicensingInfo_NoAssertionLicense AnyIndividualLicensingInfo = &ExternalIRI{ + id: "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/NoAssertionLicense", } -type ToolList []AnyTool +// IndividualLicensingInfo_NoneLicense An Individual Value for License where the SPDX data creator determines that no\nlicense is present. +var IndividualLicensingInfo_NoneLicense AnyIndividualLicensingInfo = &ExternalIRI{ + id: "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/NoneLicense", +} -func (o *ToolList) ToolIter() iter.Seq2[AnyTool, *Tool] { return typeIter(*o, castTool) } +type IndividualLicensingInfoList []AnyIndividualLicensingInfo -// Categories of confidentiality level. -type datasetConfidentialityLevelType struct { - ID string `iri:"@id"` +func (o *IndividualLicensingInfoList) IndividualLicensingInfos() ld.TypeSeq[AnyIndividualLicensingInfo, *IndividualLicensingInfo] { + return ld.NewTypeSeq(*o, castIndividualLicensingInfo) } -// Data points in the dataset can be shared only with specific organizations and their clients on a need to know basis. -var DatasetConfidentialityLevelType_Amber = datasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/amber"} +type AnyIntegrityMethod interface { + asIntegrityMethod() *IntegrityMethod +} -// Dataset may be distributed freely, without restriction. -var DatasetConfidentialityLevelType_Clear = datasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/clear"} +// IntegrityMethod Provides an independently reproducible mechanism that permits verification of a specific Element. +type IntegrityMethod struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/IntegrityMethod"` + ID string `iri:"@id"` + // Comment Provide consumers with comments by the creator of the Element about the\nElement. + Comment string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/comment" type:"http://www.w3.org/2001/XMLSchema#string"` +} -// Dataset can be shared within a community of peers and partners. -var DatasetConfidentialityLevelType_Green = datasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/green"} +func (o *IntegrityMethod) asIntegrityMethod() *IntegrityMethod { + return o +} -// Data points in the dataset are highly confidential and can only be shared with named recipients. -var DatasetConfidentialityLevelType_Red = datasetConfidentialityLevelType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/red"} +type IntegrityMethodList []AnyIntegrityMethod -// Availability of dataset. -type datasetDatasetAvailabilityType struct { - ID string `iri:"@id"` +func (o *IntegrityMethodList) ContentIdentifiers() ld.TypeSeq[AnyIntegrityMethod, *ContentIdentifier] { + return ld.NewTypeSeq(*o, castContentIdentifier) } -// the dataset is not publicly available and can only be accessed after affirmatively accepting terms on a clickthrough webpage. -var DatasetDatasetAvailabilityType_Clickthrough = datasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/clickthrough"} - -// the dataset is publicly available and can be downloaded directly. -var DatasetDatasetAvailabilityType_DirectDownload = datasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/directDownload"} +func (o *IntegrityMethodList) Hashes() ld.TypeSeq[AnyIntegrityMethod, *Hash] { + return ld.NewTypeSeq(*o, castHash) +} -// the dataset is publicly available, but not all at once, and can only be accessed through queries which return parts of the dataset. -var DatasetDatasetAvailabilityType_Query = datasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/query"} +func (o *IntegrityMethodList) IntegrityMethods() ld.TypeSeq[AnyIntegrityMethod, *IntegrityMethod] { + return ld.NewTypeSeq(*o, castIntegrityMethod) +} -// the dataset is not publicly available and an email registration is required before accessing the dataset, although without an affirmative acceptance of terms. -var DatasetDatasetAvailabilityType_Registration = datasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/registration"} +func (o *IntegrityMethodList) PackageVerificationCodes() ld.TypeSeq[AnyIntegrityMethod, *PackageVerificationCode] { + return ld.NewTypeSeq(*o, castPackageVerificationCode) +} -// the dataset provider is not making available the underlying data and the dataset must be reassembled, typically using the provided script for scraping the data. -var DatasetDatasetAvailabilityType_ScrapingScript = datasetDatasetAvailabilityType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/scrapingScript"} +type AnyLicense interface { + asLicense() *License +} -// Enumeration of dataset types. -type datasetDatasetType struct { - ID string `iri:"@id"` +// License Abstract class for the portion of an AnyLicenseInfo representing a license. +type License struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/License"` + ExtendableLicense + // SeeAlsos Contains a URL where the License or LicenseAddition can be found in use. + SeeAlsos []ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/seeAlso" type:"http://www.w3.org/2001/XMLSchema#anyURI"` + // IsDeprecatedLicenseId Specifies whether a license or additional text identifier has been marked as\ndeprecated. + IsDeprecatedLicenseId bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isDeprecatedLicenseId" type:"http://www.w3.org/2001/XMLSchema#boolean"` + // ObsoletedBy Specifies the licenseId that is preferred to be used in place of a deprecated\nLicense or LicenseAddition. + ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/obsoletedBy" type:"http://www.w3.org/2001/XMLSchema#string"` + // StandardLicenseHeader Provides a License author's preferred text to indicate that a file is covered\nby the License. + StandardLicenseHeader string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardLicenseHeader" type:"http://www.w3.org/2001/XMLSchema#string"` + // LicenseText Identifies the full text of a License or Addition. + LicenseText string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseText" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` + // IsOsiApproved Specifies whether the License is listed as approved by the\nOpen Source Initiative (OSI). + IsOsiApproved bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isOsiApproved" type:"http://www.w3.org/2001/XMLSchema#boolean"` + // LicenseXml Identifies all the text and metadata associated with a license in the license\nXML format. + LicenseXml string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/licenseXml" type:"http://www.w3.org/2001/XMLSchema#string"` + // IsFsfLibre Specifies whether the License is listed as free by the\nFree Software Foundation (FSF). + IsFsfLibre bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isFsfLibre" type:"http://www.w3.org/2001/XMLSchema#boolean"` + // StandardLicenseTemplate Identifies the full text of a License, in SPDX templating format. + StandardLicenseTemplate string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardLicenseTemplate" type:"http://www.w3.org/2001/XMLSchema#string"` } -// data is audio based, such as a collection of music from the 80s. -var DatasetDatasetType_Audio = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/audio"} +func (o *License) asLicense() *License { + return o +} -// data that is classified into a discrete number of categories, such as the eye color of a population of people. -var DatasetDatasetType_Categorical = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/categorical"} +type LicenseList []AnyLicense -// data is in the form of a graph where entries are somehow related to each other through edges, such a social network of friends. -var DatasetDatasetType_Graph = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/graph"} +func (o *LicenseList) CustomLicenses() ld.TypeSeq[AnyLicense, *CustomLicense] { + return ld.NewTypeSeq(*o, castCustomLicense) +} -// data is a collection of images such as pictures of animals. -var DatasetDatasetType_Image = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/image"} +func (o *LicenseList) Licenses() ld.TypeSeq[AnyLicense, *License] { + return ld.NewTypeSeq(*o, castLicense) +} -// data type is not known. -var DatasetDatasetType_NoAssertion = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/noAssertion"} +func (o *LicenseList) ListedLicenses() ld.TypeSeq[AnyLicense, *ListedLicense] { + return ld.NewTypeSeq(*o, castListedLicense) +} -// data consists only of numeric entries. -var DatasetDatasetType_Numeric = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/numeric"} +type AnyLicenseAddition interface { + asLicenseAddition() *LicenseAddition +} -// data is of a type not included in this list. -var DatasetDatasetType_Other = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/other"} +// LicenseAddition Abstract class for additional text intended to be added to a License, but\nwhich is not itself a standalone License. +type LicenseAddition struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/LicenseAddition"` + Element + // AdditionText Identifies the full text of a LicenseAddition. + AdditionText string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/additionText" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` + // ObsoletedBy Specifies the licenseId that is preferred to be used in place of a deprecated\nLicense or LicenseAddition. + ObsoletedBy string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/obsoletedBy" type:"http://www.w3.org/2001/XMLSchema#string"` + // LicenseXml Identifies all the text and metadata associated with a license in the license\nXML format. + LicenseXml string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/licenseXml" type:"http://www.w3.org/2001/XMLSchema#string"` + // StandardAdditionTemplate Identifies the full text of a LicenseAddition, in SPDX templating format. + StandardAdditionTemplate string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardAdditionTemplate" type:"http://www.w3.org/2001/XMLSchema#string"` + // SeeAlsos Contains a URL where the License or LicenseAddition can be found in use. + SeeAlsos []ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/seeAlso" type:"http://www.w3.org/2001/XMLSchema#anyURI"` + // IsDeprecatedAdditionId Specifies whether an additional text identifier has been marked as deprecated. + IsDeprecatedAdditionId bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isDeprecatedAdditionId" type:"http://www.w3.org/2001/XMLSchema#boolean"` +} + +func (o *LicenseAddition) asLicenseAddition() *LicenseAddition { + return o +} -// data is recorded from a physical sensor, such as a thermometer reading or biometric device. -var DatasetDatasetType_Sensor = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/sensor"} +type LicenseAdditionList []AnyLicenseAddition -// data is stored in tabular format or retrieved from a relational database. -var DatasetDatasetType_Structured = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/structured"} +func (o *LicenseAdditionList) CustomLicenseAdditions() ld.TypeSeq[AnyLicenseAddition, *CustomLicenseAddition] { + return ld.NewTypeSeq(*o, castCustomLicenseAddition) +} -// data describes the syntax or semantics of a language or text, such as a parse tree used for natural language processing. -var DatasetDatasetType_Syntactic = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/syntactic"} +func (o *LicenseAdditionList) LicenseAdditions() ld.TypeSeq[AnyLicenseAddition, *LicenseAddition] { + return ld.NewTypeSeq(*o, castLicenseAddition) +} -// data consists of unstructured text, such as a book, Wikipedia article (without images), or transcript. -var DatasetDatasetType_Text = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/text"} +func (o *LicenseAdditionList) ListedLicenseExceptions() ld.TypeSeq[AnyLicenseAddition, *ListedLicenseException] { + return ld.NewTypeSeq(*o, castListedLicenseException) +} -// data is recorded in an ordered sequence of timestamped entries, such as the price of a stock over the course of a day. -var DatasetDatasetType_Timeseries = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/timeseries"} +type AnyLicenseExpression interface { + asLicenseExpression() *LicenseExpression +} -// data is recorded with a timestamp for each entry, but not necessarily ordered or at specific intervals, such as when a taxi ride starts and ends. -var DatasetDatasetType_Timestamp = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/timestamp"} +// LicenseExpression An SPDX Element containing an SPDX license expression string. +type LicenseExpression struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/LicenseExpression"` + LicenseInfo + // LicenseExpression A string in the license expression format. + LicenseExpression string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseExpression" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` + // CustomIdToUris Maps a LicenseRef or AdditionRef string for a Custom License or a Custom\nLicense Addition to its URI ID. + CustomIdToUris DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/customIdToUri" type:"https://spdx.org/rdf/3.0.1/terms/Core/DictionaryEntry"` + // LicenseListVersion The version of the SPDX License List used in the license expression. + LicenseListVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseListVersion" type:"http://www.w3.org/2001/XMLSchema#string"` +} -// data is video based, such as a collection of movie clips featuring Tom Hanks. -var DatasetDatasetType_Video = datasetDatasetType{ID: "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/video"} +func (o *LicenseExpression) asLicenseExpression() *LicenseExpression { + return o +} -// Abstract class for additional text intended to be added to a License, but -// which is not itself a standalone License. -type ExpandedlicensingLicenseAddition struct { - Element +type LicenseExpressionList []AnyLicenseExpression - // Identifies the full text of a LicenseAddition. - ExpandedlicensingAdditionText string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/additionText" iri-compact:"expandedlicensing_additionText"` - // Specifies whether an additional text identifier has been marked as deprecated. - ExpandedlicensingIsDeprecatedAdditionId bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isDeprecatedAdditionId" iri-compact:"expandedlicensing_isDeprecatedAdditionId"` - // Identifies all the text and metadata associated with a license in the license - // XML format. - ExpandedlicensingLicenseXml string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` - // Specifies the licenseId that is preferred to be used in place of a deprecated - // License or LicenseAddition. - ExpandedlicensingObsoletedBy string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` - // Contains a URL where the License or LicenseAddition can be found in use. - ExpandedlicensingSeeAlsos []string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` - // Identifies the full text of a LicenseAddition, in SPDX templating format. - ExpandedlicensingStandardAdditionTemplate string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardAdditionTemplate" iri-compact:"expandedlicensing_standardAdditionTemplate"` +func (o *LicenseExpressionList) LicenseExpressions() ld.TypeSeq[AnyLicenseExpression, *LicenseExpression] { + return ld.NewTypeSeq(*o, castLicenseExpression) } -func castExpandedlicensingLicenseAddition(o any) *ExpandedlicensingLicenseAddition { - if o, ok := o.(AnyExpandedlicensingLicenseAddition); ok { - return o.asExpandedlicensingLicenseAddition() - } - return nil +type AnyLicenseInfo interface { + asLicenseInfo() *LicenseInfo } -func (o *ExpandedlicensingLicenseAddition) asExpandedlicensingLicenseAddition() *ExpandedlicensingLicenseAddition { - return o +// LicenseInfo Abstract class representing a license combination consisting of one or more licenses. +type LicenseInfo struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/AnyLicenseInfo"` + Element } -type AnyExpandedlicensingLicenseAddition interface { - AnyElement - asExpandedlicensingLicenseAddition() *ExpandedlicensingLicenseAddition +func (o *LicenseInfo) asLicenseInfo() *LicenseInfo { + return o } -type ExpandedlicensingLicenseAdditionList []AnyExpandedlicensingLicenseAddition +type LicenseInfoList []AnyLicenseInfo -func (o *ExpandedlicensingLicenseAdditionList) ExpandedlicensingLicenseAdditionIter() iter.Seq2[AnyExpandedlicensingLicenseAddition, *ExpandedlicensingLicenseAddition] { - return typeIter(*o, castExpandedlicensingLicenseAddition) +func (o *LicenseInfoList) ConjunctiveLicenseSets() ld.TypeSeq[AnyLicenseInfo, *ConjunctiveLicenseSet] { + return ld.NewTypeSeq(*o, castConjunctiveLicenseSet) } -func (o *ExpandedlicensingLicenseAdditionList) ExpandedlicensingListedLicenseExceptionIter() iter.Seq2[AnyExpandedlicensingLicenseAddition, *ExpandedlicensingListedLicenseException] { - return typeIter(*o, castExpandedlicensingListedLicenseException) + +func (o *LicenseInfoList) CustomLicenses() ld.TypeSeq[AnyLicenseInfo, *CustomLicense] { + return ld.NewTypeSeq(*o, castCustomLicense) } -func (o *ExpandedlicensingLicenseAdditionList) ExpandedlicensingCustomLicenseAdditionIter() iter.Seq2[AnyExpandedlicensingLicenseAddition, *ExpandedlicensingCustomLicenseAddition] { - return typeIter(*o, castExpandedlicensingCustomLicenseAddition) + +func (o *LicenseInfoList) DisjunctiveLicenseSets() ld.TypeSeq[AnyLicenseInfo, *DisjunctiveLicenseSet] { + return ld.NewTypeSeq(*o, castDisjunctiveLicenseSet) } -// A license exception that is listed on the SPDX Exceptions list. -type ExpandedlicensingListedLicenseException struct { - ExpandedlicensingLicenseAddition +func (o *LicenseInfoList) ExtendableLicenses() ld.TypeSeq[AnyLicenseInfo, *ExtendableLicense] { + return ld.NewTypeSeq(*o, castExtendableLicense) +} - // Specifies the SPDX License List version in which this license or exception - // identifier was deprecated. - ExpandedlicensingDeprecatedVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/deprecatedVersion" iri-compact:"expandedlicensing_deprecatedVersion"` - // Specifies the SPDX License List version in which this ListedLicense or - // ListedLicenseException identifier was first added. - ExpandedlicensingListVersionAdded string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/listVersionAdded" iri-compact:"expandedlicensing_listVersionAdded"` +func (o *LicenseInfoList) IndividualLicensingInfos() ld.TypeSeq[AnyLicenseInfo, *IndividualLicensingInfo] { + return ld.NewTypeSeq(*o, castIndividualLicensingInfo) } -func castExpandedlicensingListedLicenseException(o any) *ExpandedlicensingListedLicenseException { - if o, ok := o.(AnyExpandedlicensingListedLicenseException); ok { - return o.asExpandedlicensingListedLicenseException() - } - return nil +func (o *LicenseInfoList) Licenses() ld.TypeSeq[AnyLicenseInfo, *License] { + return ld.NewTypeSeq(*o, castLicense) } -func (o *ExpandedlicensingListedLicenseException) asExpandedlicensingListedLicenseException() *ExpandedlicensingListedLicenseException { - return o +func (o *LicenseInfoList) LicenseExpressions() ld.TypeSeq[AnyLicenseInfo, *LicenseExpression] { + return ld.NewTypeSeq(*o, castLicenseExpression) } -type AnyExpandedlicensingListedLicenseException interface { - AnyExpandedlicensingLicenseAddition - asExpandedlicensingListedLicenseException() *ExpandedlicensingListedLicenseException +func (o *LicenseInfoList) LicenseInfos() ld.TypeSeq[AnyLicenseInfo, *LicenseInfo] { + return ld.NewTypeSeq(*o, castLicenseInfo) } -type ExpandedlicensingListedLicenseExceptionList []AnyExpandedlicensingListedLicenseException +func (o *LicenseInfoList) ListedLicenses() ld.TypeSeq[AnyLicenseInfo, *ListedLicense] { + return ld.NewTypeSeq(*o, castListedLicense) +} -func (o *ExpandedlicensingListedLicenseExceptionList) ExpandedlicensingListedLicenseExceptionIter() iter.Seq2[AnyExpandedlicensingListedLicenseException, *ExpandedlicensingListedLicenseException] { - return typeIter(*o, castExpandedlicensingListedLicenseException) +func (o *LicenseInfoList) OrLaterOperators() ld.TypeSeq[AnyLicenseInfo, *OrLaterOperator] { + return ld.NewTypeSeq(*o, castOrLaterOperator) } -// A property name with an associated value. -type ExtensionCdxPropertyEntry struct { - ID string `iri:"@id"` +func (o *LicenseInfoList) WithAdditionOperators() ld.TypeSeq[AnyLicenseInfo, *WithAdditionOperator] { + return ld.NewTypeSeq(*o, castWithAdditionOperator) +} - // A name used in a CdxPropertyEntry name-value pair. - ExtensionCdxPropName string `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/cdxPropName" iri-compact:"extension_cdxPropName"` - // A value used in a CdxPropertyEntry name-value pair. - ExtensionCdxPropValue string `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/cdxPropValue" iri-compact:"extension_cdxPropValue"` +// LifecycleScopeType Provide an enumerated set of lifecycle phases that can provide context to relationships. +type LifecycleScopeType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType"` + id string `iri:"@id"` } -func castExtensionCdxPropertyEntry(o any) *ExtensionCdxPropertyEntry { - if o, ok := o.(AnyExtensionCdxPropertyEntry); ok { - return o.asExtensionCdxPropertyEntry() - } - return nil +// LifecycleScopeType_Build A relationship has specific context implications during an element's build phase, during development. +var LifecycleScopeType_Build = LifecycleScopeType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/build", } -func (o *ExtensionCdxPropertyEntry) asExtensionCdxPropertyEntry() *ExtensionCdxPropertyEntry { - return o +// LifecycleScopeType_Design A relationship has specific context implications during an element's design. +var LifecycleScopeType_Design = LifecycleScopeType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/design", } -type AnyExtensionCdxPropertyEntry interface { - asExtensionCdxPropertyEntry() *ExtensionCdxPropertyEntry +// LifecycleScopeType_Development A relationship has specific context implications during development phase of an element. +var LifecycleScopeType_Development = LifecycleScopeType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/development", } -type ExtensionCdxPropertyEntryList []AnyExtensionCdxPropertyEntry +// LifecycleScopeType_Other A relationship has other specific context information necessary to capture that the above set of enumerations does not handle. +var LifecycleScopeType_Other = LifecycleScopeType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/other", +} -func (o *ExtensionCdxPropertyEntryList) ExtensionCdxPropertyEntryIter() iter.Seq2[AnyExtensionCdxPropertyEntry, *ExtensionCdxPropertyEntry] { - return typeIter(*o, castExtensionCdxPropertyEntry) +// LifecycleScopeType_Runtime A relationship has specific context implications during the execution phase of an element. +var LifecycleScopeType_Runtime = LifecycleScopeType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/runtime", } -// A characterization of some aspect of an Element that is associated with the Element in a generalized fashion. -type ExtensionExtension struct { - ID string `iri:"@id"` +// LifecycleScopeType_Test A relationship has specific context implications during an element's testing phase, during development. +var LifecycleScopeType_Test = LifecycleScopeType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/test", } -func castExtensionExtension(o any) *ExtensionExtension { - if o, ok := o.(AnyExtensionExtension); ok { - return o.asExtensionExtension() - } - return nil +type AnyLifecycleScopedRelationship interface { + asLifecycleScopedRelationship() *LifecycleScopedRelationship } -func (o *ExtensionExtension) asExtensionExtension() *ExtensionExtension { - return o +// LifecycleScopedRelationship Provide context for a relationship that occurs in the lifecycle. +type LifecycleScopedRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopedRelationship"` + Relationship + // Scope Capture the scope of information about a specific relationship between elements. + Scope LifecycleScopeType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/scope" type:"https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType"` } -type AnyExtensionExtension interface { - asExtensionExtension() *ExtensionExtension +func (o *LifecycleScopedRelationship) asLifecycleScopedRelationship() *LifecycleScopedRelationship { + return o } -type ExtensionExtensionList []AnyExtensionExtension +type LifecycleScopedRelationshipList []AnyLifecycleScopedRelationship -func (o *ExtensionExtensionList) ExtensionExtensionIter() iter.Seq2[AnyExtensionExtension, *ExtensionExtension] { - return typeIter(*o, castExtensionExtension) -} -func (o *ExtensionExtensionList) ExtensionCdxPropertiesExtensionIter() iter.Seq2[AnyExtensionExtension, *ExtensionCdxPropertiesExtension] { - return typeIter(*o, castExtensionCdxPropertiesExtension) +func (o *LifecycleScopedRelationshipList) LifecycleScopedRelationships() ld.TypeSeq[AnyLifecycleScopedRelationship, *LifecycleScopedRelationship] { + return ld.NewTypeSeq(*o, castLifecycleScopedRelationship) } -// Specifies the CVSS base, temporal, threat, or environmental severity type. -type securityCvssSeverityType struct { - ID string `iri:"@id"` +type AnyListedLicense interface { + asListedLicense() *ListedLicense } -// When a CVSS score is between 9.0 - 10.0 -var SecurityCvssSeverityType_Critical = securityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/critical"} - -// When a CVSS score is between 7.0 - 8.9 -var SecurityCvssSeverityType_High = securityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/high"} - -// When a CVSS score is between 0.1 - 3.9 -var SecurityCvssSeverityType_Low = securityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/low"} +// ListedLicense A license that is listed on the SPDX License List. +type ListedLicense struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/ListedLicense"` + License + // ListVersionAdded Specifies the SPDX License List version in which this ListedLicense or\nListedLicenseException identifier was first added. + ListVersionAdded string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/listVersionAdded" type:"http://www.w3.org/2001/XMLSchema#string"` + // DeprecatedVersion Specifies the SPDX License List version in which this license or exception\nidentifier was deprecated. + DeprecatedVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/deprecatedVersion" type:"http://www.w3.org/2001/XMLSchema#string"` +} -// When a CVSS score is between 4.0 - 6.9 -var SecurityCvssSeverityType_Medium = securityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/medium"} +func (o *ListedLicense) asListedLicense() *ListedLicense { + return o +} -// When a CVSS score is 0.0 -var SecurityCvssSeverityType_None = securityCvssSeverityType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/none"} +type ListedLicenseList []AnyListedLicense -// Specifies the exploit catalog type. -type securityExploitCatalogType struct { - ID string `iri:"@id"` +func (o *ListedLicenseList) ListedLicenses() ld.TypeSeq[AnyListedLicense, *ListedLicense] { + return ld.NewTypeSeq(*o, castListedLicense) } -// CISA's Known Exploited Vulnerability (KEV) Catalog -var SecurityExploitCatalogType_Kev = securityExploitCatalogType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType/kev"} - -// Other exploit catalogs -var SecurityExploitCatalogType_Other = securityExploitCatalogType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType/other"} +type AnyListedLicenseException interface { + asListedLicenseException() *ListedLicenseException +} -// Specifies the SSVC decision type. -type securitySsvcDecisionType struct { - ID string `iri:"@id"` +// ListedLicenseException A license exception that is listed on the SPDX Exceptions list. +type ListedLicenseException struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/ListedLicenseException"` + LicenseAddition + // DeprecatedVersion Specifies the SPDX License List version in which this license or exception\nidentifier was deprecated. + DeprecatedVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/deprecatedVersion" type:"http://www.w3.org/2001/XMLSchema#string"` + // ListVersionAdded Specifies the SPDX License List version in which this ListedLicense or\nListedLicenseException identifier was first added. + ListVersionAdded string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/listVersionAdded" type:"http://www.w3.org/2001/XMLSchema#string"` } -// The vulnerability requires attention from the organization's internal, supervisory-level and leadership-level individuals. Necessary actions include requesting assistance or information about the vulnerability, as well as publishing a notification either internally and/or externally. Typically, internal groups would meet to determine the overall response and then execute agreed upon actions. CISA recommends remediating Act vulnerabilities as soon as possible. -var SecuritySsvcDecisionType_Act = securitySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/act"} +func (o *ListedLicenseException) asListedLicenseException() *ListedLicenseException { + return o +} -// The vulnerability requires attention from the organization's internal, supervisory-level individuals. Necessary actions include requesting assistance or information about the vulnerability, and may involve publishing a notification either internally and/or externally. CISA recommends remediating Attend vulnerabilities sooner than standard update timelines. -var SecuritySsvcDecisionType_Attend = securitySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/attend"} +type ListedLicenseExceptionList []AnyListedLicenseException -// The vulnerability does not require action at this time. The organization would continue to track the vulnerability and reassess it if new information becomes available. CISA recommends remediating Track vulnerabilities within standard update timelines. -var SecuritySsvcDecisionType_Track = securitySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/track"} +func (o *ListedLicenseExceptionList) ListedLicenseExceptions() ld.TypeSeq[AnyListedLicenseException, *ListedLicenseException] { + return ld.NewTypeSeq(*o, castListedLicenseException) +} -// ("Track\*" in the SSVC spec) The vulnerability contains specific characteristics that may require closer monitoring for changes. CISA recommends remediating Track\* vulnerabilities within standard update timelines. -var SecuritySsvcDecisionType_TrackStar = securitySsvcDecisionType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/trackStar"} +type AnyNamespaceMap interface { + asNamespaceMap() *NamespaceMap +} -// Specifies the VEX justification type. -type securityVexJustificationType struct { - ID string `iri:"@id"` +// NamespaceMap A mapping between prefixes and namespace partial URIs. +type NamespaceMap struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/NamespaceMap"` + ID string `iri:"@id"` + // Namespace Provides an unambiguous mechanism for conveying a URI fragment portion of an\nElement ID. + Namespace ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Core/namespace" required:"true" type:"http://www.w3.org/2001/XMLSchema#anyURI"` + // Prefix A substitute for a URI. + Prefix string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/prefix" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` } -// The software is not affected because the vulnerable component is not in the product. -var SecurityVexJustificationType_ComponentNotPresent = securityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/componentNotPresent"} +func (o *NamespaceMap) asNamespaceMap() *NamespaceMap { + return o +} -// Built-in inline controls or mitigations prevent an adversary from leveraging the vulnerability. -var SecurityVexJustificationType_InlineMitigationsAlreadyExist = securityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/inlineMitigationsAlreadyExist"} +type NamespaceMapList []AnyNamespaceMap -// The vulnerable component is present, and the component contains the vulnerable code. However, vulnerable code is used in such a way that an attacker cannot mount any anticipated attack. -var SecurityVexJustificationType_VulnerableCodeCannotBeControlledByAdversary = securityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeCannotBeControlledByAdversary"} +func (o *NamespaceMapList) NamespaceMaps() ld.TypeSeq[AnyNamespaceMap, *NamespaceMap] { + return ld.NewTypeSeq(*o, castNamespaceMap) +} -// The affected code is not reachable through the execution of the code, including non-anticipated states of the product. -var SecurityVexJustificationType_VulnerableCodeNotInExecutePath = securityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeNotInExecutePath"} +type AnyOrLaterOperator interface { + asOrLaterOperator() *OrLaterOperator +} -// The product is not affected because the code underlying the vulnerability is not present in the product. -var SecurityVexJustificationType_VulnerableCodeNotPresent = securityVexJustificationType{ID: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeNotPresent"} +// OrLaterOperator Portion of an AnyLicenseInfo representing this version, or any later version,\nof the indicated License. +type OrLaterOperator struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/OrLaterOperator"` + ExtendableLicense + // SubjectLicense A License participating in an 'or later' model. + SubjectLicense AnyLicense `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectLicense" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/License"` +} -// Abstract ancestor class for all vulnerability assessments -type SecurityVulnAssessmentRelationship struct { - Relationship +func (o *OrLaterOperator) asOrLaterOperator() *OrLaterOperator { + return o +} - // Identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy AnyAgent `iri:"https://spdx.org/rdf/3.0.1/terms/Core/suppliedBy" iri-compact:"suppliedBy"` +type OrLaterOperatorList []AnyOrLaterOperator - // Specifies an Element contained in a piece of software where a vulnerability was - // found. - SecurityAssessedElement AnySoftwareSoftwareArtifact `iri:"https://spdx.org/rdf/3.0.1/terms/Security/assessedElement" iri-compact:"security_assessedElement"` +func (o *OrLaterOperatorList) OrLaterOperators() ld.TypeSeq[AnyOrLaterOperator, *OrLaterOperator] { + return ld.NewTypeSeq(*o, castOrLaterOperator) +} - // Specifies a time when a vulnerability assessment was modified - SecurityModifiedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // Specifies the time when a vulnerability was published. - SecurityPublishedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // Specified the time and date when a vulnerability was withdrawn. - SecurityWithdrawnTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` +type AnyOrganization interface { + asOrganization() *Organization } -func castSecurityVulnAssessmentRelationship(o any) *SecurityVulnAssessmentRelationship { - if o, ok := o.(AnySecurityVulnAssessmentRelationship); ok { - return o.asSecurityVulnAssessmentRelationship() - } - return nil +// Organization A group of people who work together in an organized way for a shared purpose. +type Organization struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/Organization"` + Agent } -func (o *SecurityVulnAssessmentRelationship) asSecurityVulnAssessmentRelationship() *SecurityVulnAssessmentRelationship { +func (o *Organization) asOrganization() *Organization { return o } -type AnySecurityVulnAssessmentRelationship interface { - AnyRelationship - asSecurityVulnAssessmentRelationship() *SecurityVulnAssessmentRelationship +// Organization_SpdxOrganization An Organization representing the SPDX Project. +var Organization_SpdxOrganization AnyOrganization = &ExternalIRI{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/SpdxOrganization", } -type SecurityVulnAssessmentRelationshipList []AnySecurityVulnAssessmentRelationship +type OrganizationList []AnyOrganization -func (o *SecurityVulnAssessmentRelationshipList) SecurityVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVulnAssessmentRelationship) -} -func (o *SecurityVulnAssessmentRelationshipList) SecurityCvssV2VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityCvssV2VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV2VulnAssessmentRelationship) -} -func (o *SecurityVulnAssessmentRelationshipList) SecurityCvssV3VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityCvssV3VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV3VulnAssessmentRelationship) -} -func (o *SecurityVulnAssessmentRelationshipList) SecurityCvssV4VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityCvssV4VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV4VulnAssessmentRelationship) +func (o *OrganizationList) Organizations() ld.TypeSeq[AnyOrganization, *Organization] { + return ld.NewTypeSeq(*o, castOrganization) } -func (o *SecurityVulnAssessmentRelationshipList) SecurityEpssVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityEpssVulnAssessmentRelationship] { - return typeIter(*o, castSecurityEpssVulnAssessmentRelationship) -} -func (o *SecurityVulnAssessmentRelationshipList) SecurityExploitCatalogVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityExploitCatalogVulnAssessmentRelationship] { - return typeIter(*o, castSecurityExploitCatalogVulnAssessmentRelationship) -} -func (o *SecurityVulnAssessmentRelationshipList) SecuritySsvcVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecuritySsvcVulnAssessmentRelationship] { - return typeIter(*o, castSecuritySsvcVulnAssessmentRelationship) + +type AnyPackage interface { + asPackage() *Package } -func (o *SecurityVulnAssessmentRelationshipList) SecurityVexVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVexVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexVulnAssessmentRelationship) + +// Package Refers to any unit of content that can be associated with a distribution of\nsoftware. +type Package struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Software/Package"` + SoftwareArtifact + // SourceInfo Records any relevant background information or additional comments\nabout the origin of the package. + SourceInfo string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/sourceInfo" type:"http://www.w3.org/2001/XMLSchema#string"` + // HomePage A place for the SPDX document creator to record a website that serves as the\npackage's home page. + HomePage ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Software/homePage" type:"http://www.w3.org/2001/XMLSchema#anyURI"` + // PackageVersion Identify the version of a package. + PackageVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/packageVersion" type:"http://www.w3.org/2001/XMLSchema#string"` + // PackageUrl Provides a place for the SPDX data creator to record the package URL string\n(in accordance with the Package URL specification) for a software Package. + PackageUrl ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Software/packageUrl" type:"http://www.w3.org/2001/XMLSchema#anyURI"` + // DownloadLocation Identifies the download Uniform Resource Identifier for the package at the time\nthat the document was created. + DownloadLocation ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Software/downloadLocation" type:"http://www.w3.org/2001/XMLSchema#anyURI"` } -func (o *SecurityVulnAssessmentRelationshipList) SecurityVexAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVexAffectedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexAffectedVulnAssessmentRelationship) + +func (o *Package) asPackage() *Package { + return o } -func (o *SecurityVulnAssessmentRelationshipList) SecurityVexFixedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVexFixedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexFixedVulnAssessmentRelationship) + +type PackageList []AnyPackage + +func (o *PackageList) AIPackages() ld.TypeSeq[AnyPackage, *AIPackage] { + return ld.NewTypeSeq(*o, castAIPackage) } -func (o *SecurityVulnAssessmentRelationshipList) SecurityVexNotAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVexNotAffectedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexNotAffectedVulnAssessmentRelationship) + +func (o *PackageList) DatasetPackages() ld.TypeSeq[AnyPackage, *DatasetPackage] { + return ld.NewTypeSeq(*o, castDatasetPackage) } -func (o *SecurityVulnAssessmentRelationshipList) SecurityVexUnderInvestigationVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVulnAssessmentRelationship, *SecurityVexUnderInvestigationVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexUnderInvestigationVulnAssessmentRelationship) + +func (o *PackageList) Packages() ld.TypeSeq[AnyPackage, *Package] { + return ld.NewTypeSeq(*o, castPackage) } -// Abstract class representing a license combination consisting of one or more licenses. -type SimplelicensingAnyLicenseInfo struct { - Element +type AnyPackageVerificationCode interface { + asPackageVerificationCode() *PackageVerificationCode } -func castSimplelicensingAnyLicenseInfo(o any) *SimplelicensingAnyLicenseInfo { - if o, ok := o.(AnySimplelicensingAnyLicenseInfo); ok { - return o.asSimplelicensingAnyLicenseInfo() - } - return nil +// PackageVerificationCode An SPDX version 2.X compatible verification method for software packages. +type PackageVerificationCode struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/PackageVerificationCode"` + IntegrityMethod + // Algorithm Specifies the algorithm used for calculating the hash value. + Algorithm HashAlgorithm `iri:"https://spdx.org/rdf/3.0.1/terms/Core/algorithm" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm"` + // HashValue The result of applying a hash algorithm to an Element. + HashValue string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/hashValue" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` + // PackageVerificationCodeExcludedFiles The relative file name of a file to be excluded from the\n`PackageVerificationCode`. + PackageVerificationCodeExcludedFiles []string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/packageVerificationCodeExcludedFile" type:"http://www.w3.org/2001/XMLSchema#string"` } -func (o *SimplelicensingAnyLicenseInfo) asSimplelicensingAnyLicenseInfo() *SimplelicensingAnyLicenseInfo { +func (o *PackageVerificationCode) asPackageVerificationCode() *PackageVerificationCode { return o } -type AnySimplelicensingAnyLicenseInfo interface { - AnyElement - asSimplelicensingAnyLicenseInfo() *SimplelicensingAnyLicenseInfo -} +type PackageVerificationCodeList []AnyPackageVerificationCode -type SimplelicensingAnyLicenseInfoList []AnySimplelicensingAnyLicenseInfo +func (o *PackageVerificationCodeList) PackageVerificationCodes() ld.TypeSeq[AnyPackageVerificationCode, *PackageVerificationCode] { + return ld.NewTypeSeq(*o, castPackageVerificationCode) +} -func (o *SimplelicensingAnyLicenseInfoList) SimplelicensingAnyLicenseInfoIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *SimplelicensingAnyLicenseInfo] { - return typeIter(*o, castSimplelicensingAnyLicenseInfo) +type AnyPerson interface { + asPerson() *Person } -func (o *SimplelicensingAnyLicenseInfoList) SimplelicensingLicenseExpressionIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *SimplelicensingLicenseExpression] { - return typeIter(*o, castSimplelicensingLicenseExpression) + +// Person An individual human being. +type Person struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/Person"` + Agent } -func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingConjunctiveLicenseSetIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingConjunctiveLicenseSet] { - return typeIter(*o, castExpandedlicensingConjunctiveLicenseSet) + +func (o *Person) asPerson() *Person { + return o } -func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingDisjunctiveLicenseSetIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingDisjunctiveLicenseSet] { - return typeIter(*o, castExpandedlicensingDisjunctiveLicenseSet) + +type PersonList []AnyPerson + +func (o *PersonList) People() ld.TypeSeq[AnyPerson, *Person] { + return ld.NewTypeSeq(*o, castPerson) } -func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingExtendableLicenseIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingExtendableLicense] { - return typeIter(*o, castExpandedlicensingExtendableLicense) + +type AnyPositiveIntegerRange interface { + asPositiveIntegerRange() *PositiveIntegerRange } -func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingIndividualLicensingInfoIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingIndividualLicensingInfo] { - return typeIter(*o, castExpandedlicensingIndividualLicensingInfo) + +// PositiveIntegerRange A tuple of two positive integers that define a range. +type PositiveIntegerRange struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/PositiveIntegerRange"` + ID string `iri:"@id"` + // EndIntegerRange Defines the end of a range. + EndIntegerRange ld.PositiveInt `iri:"https://spdx.org/rdf/3.0.1/terms/Core/endIntegerRange" required:"true" type:"http://www.w3.org/2001/XMLSchema#positiveInteger"` + // BeginIntegerRange Defines the beginning of a range. + BeginIntegerRange ld.PositiveInt `iri:"https://spdx.org/rdf/3.0.1/terms/Core/beginIntegerRange" required:"true" type:"http://www.w3.org/2001/XMLSchema#positiveInteger"` } -func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingLicenseIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingLicense] { - return typeIter(*o, castExpandedlicensingLicense) + +func (o *PositiveIntegerRange) asPositiveIntegerRange() *PositiveIntegerRange { + return o } -func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingListedLicenseIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingListedLicense] { - return typeIter(*o, castExpandedlicensingListedLicense) + +type PositiveIntegerRangeList []AnyPositiveIntegerRange + +func (o *PositiveIntegerRangeList) PositiveIntegerRanges() ld.TypeSeq[AnyPositiveIntegerRange, *PositiveIntegerRange] { + return ld.NewTypeSeq(*o, castPositiveIntegerRange) } -func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingOrLaterOperatorIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingOrLaterOperator] { - return typeIter(*o, castExpandedlicensingOrLaterOperator) + +// PresenceType Categories of presence or absence. +type PresenceType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/PresenceType"` + id string `iri:"@id"` } -func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingWithAdditionOperatorIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingWithAdditionOperator] { - return typeIter(*o, castExpandedlicensingWithAdditionOperator) + +// PresenceType_No Indicates absence of the field. +var PresenceType_No = PresenceType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/no", } -func (o *SimplelicensingAnyLicenseInfoList) ExpandedlicensingCustomLicenseIter() iter.Seq2[AnySimplelicensingAnyLicenseInfo, *ExpandedlicensingCustomLicense] { - return typeIter(*o, castExpandedlicensingCustomLicense) + +// PresenceType_NoAssertion Makes no assertion about the field. +var PresenceType_NoAssertion = PresenceType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/noAssertion", } -// An SPDX Element containing an SPDX license expression string. -type SimplelicensingLicenseExpression struct { - SimplelicensingAnyLicenseInfo +// PresenceType_Yes Indicates presence of the field. +var PresenceType_Yes = PresenceType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/yes", +} - // Maps a LicenseRef or AdditionRef string for a Custom License or a Custom - // License Addition to its URI ID. - SimplelicensingCustomIdToUris DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/customIdToUri" iri-compact:"simplelicensing_customIdToUri"` +// ProfileIdentifierType Enumeration of the valid profiles. +type ProfileIdentifierType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType"` + id string `iri:"@id"` +} - // A string in the license expression format. - SimplelicensingLicenseExpression string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseExpression" iri-compact:"simplelicensing_licenseExpression"` - // The version of the SPDX License List used in the license expression. - SimplelicensingLicenseListVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseListVersion" iri-compact:"simplelicensing_licenseListVersion"` +// ProfileIdentifierType_Ai the element follows the AI profile specification +var ProfileIdentifierType_Ai = ProfileIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/ai", } -func castSimplelicensingLicenseExpression(o any) *SimplelicensingLicenseExpression { - if o, ok := o.(AnySimplelicensingLicenseExpression); ok { - return o.asSimplelicensingLicenseExpression() - } - return nil +// ProfileIdentifierType_Build the element follows the Build profile specification +var ProfileIdentifierType_Build = ProfileIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/build", } -func (o *SimplelicensingLicenseExpression) asSimplelicensingLicenseExpression() *SimplelicensingLicenseExpression { - return o +// ProfileIdentifierType_Core the element follows the Core profile specification +var ProfileIdentifierType_Core = ProfileIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/core", } -type AnySimplelicensingLicenseExpression interface { - AnySimplelicensingAnyLicenseInfo - asSimplelicensingLicenseExpression() *SimplelicensingLicenseExpression +// ProfileIdentifierType_Dataset the element follows the Dataset profile specification +var ProfileIdentifierType_Dataset = ProfileIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/dataset", } -type SimplelicensingLicenseExpressionList []AnySimplelicensingLicenseExpression +// ProfileIdentifierType_ExpandedLicensing the element follows the ExpandedLicensing profile specification +var ProfileIdentifierType_ExpandedLicensing = ProfileIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/expandedLicensing", +} -func (o *SimplelicensingLicenseExpressionList) SimplelicensingLicenseExpressionIter() iter.Seq2[AnySimplelicensingLicenseExpression, *SimplelicensingLicenseExpression] { - return typeIter(*o, castSimplelicensingLicenseExpression) +// ProfileIdentifierType_Extension the element follows the Extension profile specification +var ProfileIdentifierType_Extension = ProfileIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/extension", } -// A license or addition that is not listed on the SPDX License List. -type SimplelicensingSimpleLicensingText struct { - Element +// ProfileIdentifierType_Lite the element follows the Lite profile specification +var ProfileIdentifierType_Lite = ProfileIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/lite", +} - // Identifies the full text of a License or Addition. - SimplelicensingLicenseText string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` +// ProfileIdentifierType_Security the element follows the Security profile specification +var ProfileIdentifierType_Security = ProfileIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/security", } -func castSimplelicensingSimpleLicensingText(o any) *SimplelicensingSimpleLicensingText { - if o, ok := o.(AnySimplelicensingSimpleLicensingText); ok { - return o.asSimplelicensingSimpleLicensingText() - } - return nil +// ProfileIdentifierType_SimpleLicensing the element follows the SimpleLicensing profile specification +var ProfileIdentifierType_SimpleLicensing = ProfileIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/simpleLicensing", } -func (o *SimplelicensingSimpleLicensingText) asSimplelicensingSimpleLicensingText() *SimplelicensingSimpleLicensingText { - return o +// ProfileIdentifierType_Software the element follows the Software profile specification +var ProfileIdentifierType_Software = ProfileIdentifierType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/software", } -type AnySimplelicensingSimpleLicensingText interface { - AnyElement - asSimplelicensingSimpleLicensingText() *SimplelicensingSimpleLicensingText +type AnyRelationship interface { + asRelationship() *Relationship } -type SimplelicensingSimpleLicensingTextList []AnySimplelicensingSimpleLicensingText +// Relationship Describes a relationship between one or more elements. +type Relationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/Relationship"` + Element + // Completeness Provides information about the completeness of relationships. + Completeness RelationshipCompleteness `iri:"https://spdx.org/rdf/3.0.1/terms/Core/completeness" type:"https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness"` + // EndTime Specifies the time from which an element is no longer applicable / valid. + EndTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/endTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` + // To References an Element on the right-hand side of a relationship. + To ElementList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/to" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Core/Element"` + // From References the Element on the left-hand side of a relationship. + From AnyElement `iri:"https://spdx.org/rdf/3.0.1/terms/Core/from" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Core/Element"` + // RelationshipType Information about the relationship between two Elements. + RelationshipType RelationshipType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/relationshipType" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType"` + // StartTime Specifies the time from which an element is applicable / valid. + StartTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/startTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` +} -func (o *SimplelicensingSimpleLicensingTextList) SimplelicensingSimpleLicensingTextIter() iter.Seq2[AnySimplelicensingSimpleLicensingText, *SimplelicensingSimpleLicensingText] { - return typeIter(*o, castSimplelicensingSimpleLicensingText) +func (o *Relationship) asRelationship() *Relationship { + return o } -// A canonical, unique, immutable identifier -type SoftwareContentIdentifier struct { - IntegrityMethod +type RelationshipList []AnyRelationship - // Specifies the type of the content identifier. - SoftwareContentIdentifierType softwareContentIdentifierType `iri:"https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifierType" iri-compact:"software_contentIdentifierType"` - // Specifies the value of the content identifier. - SoftwareContentIdentifierValue string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifierValue" iri-compact:"software_contentIdentifierValue"` +func (o *RelationshipList) CvssV2VulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *CvssV2VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV2VulnAssessmentRelationship) } -func castSoftwareContentIdentifier(o any) *SoftwareContentIdentifier { - if o, ok := o.(AnySoftwareContentIdentifier); ok { - return o.asSoftwareContentIdentifier() - } - return nil +func (o *RelationshipList) CvssV3VulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *CvssV3VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV3VulnAssessmentRelationship) } -func (o *SoftwareContentIdentifier) asSoftwareContentIdentifier() *SoftwareContentIdentifier { - return o +func (o *RelationshipList) CvssV4VulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *CvssV4VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV4VulnAssessmentRelationship) } -type AnySoftwareContentIdentifier interface { - AnyIntegrityMethod - asSoftwareContentIdentifier() *SoftwareContentIdentifier +func (o *RelationshipList) EpssVulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *EpssVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castEpssVulnAssessmentRelationship) } -type SoftwareContentIdentifierList []AnySoftwareContentIdentifier - -func (o *SoftwareContentIdentifierList) SoftwareContentIdentifierIter() iter.Seq2[AnySoftwareContentIdentifier, *SoftwareContentIdentifier] { - return typeIter(*o, castSoftwareContentIdentifier) +func (o *RelationshipList) ExploitCatalogVulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *ExploitCatalogVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castExploitCatalogVulnAssessmentRelationship) } -// Specifies the type of a content identifier. -type softwareContentIdentifierType struct { - ID string `iri:"@id"` +func (o *RelationshipList) LifecycleScopedRelationships() ld.TypeSeq[AnyRelationship, *LifecycleScopedRelationship] { + return ld.NewTypeSeq(*o, castLifecycleScopedRelationship) } -// [Gitoid](https://www.iana.org/assignments/uri-schemes/prov/gitoid), stands for [Git Object ID](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). A gitoid of type blob is a unique hash of a binary artifact. A gitoid may represent either an [Artifact Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-identifier-types) for the software artifact or an [Input Manifest Identifier](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#input-manifest-identifier) for the software artifact's associated [Artifact Input Manifest](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-input-manifest); this ambiguity exists because the Artifact Input Manifest is itself an artifact, and the gitoid of that artifact is its valid identifier. Gitoids calculated on software artifacts (Snippet, File, or Package Elements) should be recorded in the SPDX 3.0 SoftwareArtifact's contentIdentifier property. Gitoids calculated on the Artifact Input Manifest (Input Manifest Identifier) should be recorded in the SPDX 3.0 Element's externalIdentifier property. See [OmniBOR Specification](https://github.com/omnibor/spec/), a minimalistic specification for describing software [Artifact Dependency Graphs](https://github.com/omnibor/spec/blob/eb1ee5c961c16215eb8709b2975d193a2007a35d/spec/SPEC.md#artifact-dependency-graph-adg). -var SoftwareContentIdentifierType_Gitoid = softwareContentIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType/gitoid"} - -// SoftWare Hash IDentifier, a persistent intrinsic identifier for digital artifacts, such as files, trees (also known as directories or folders), commits, and other objects typically found in version control systems. The format of the identifiers is defined in the [SWHID specification](https://www.swhid.org/specification/v1.1/4.Syntax) (ISO/IEC DIS 18670). They typically look like `swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2`. -var SoftwareContentIdentifierType_Swhid = softwareContentIdentifierType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType/swhid"} +func (o *RelationshipList) Relationships() ld.TypeSeq[AnyRelationship, *Relationship] { + return ld.NewTypeSeq(*o, castRelationship) +} -// Enumeration of the different kinds of SPDX file. -type softwareFileKindType struct { - ID string `iri:"@id"` +func (o *RelationshipList) SsvcVulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *SsvcVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castSsvcVulnAssessmentRelationship) } -// The file represents a directory and all content stored in that directory. -var SoftwareFileKindType_Directory = softwareFileKindType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType/directory"} +func (o *RelationshipList) VexAffectedVulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *VexAffectedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexAffectedVulnAssessmentRelationship) +} -// The file represents a single file (default). -var SoftwareFileKindType_File = softwareFileKindType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType/file"} +func (o *RelationshipList) VexFixedVulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *VexFixedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexFixedVulnAssessmentRelationship) +} -// Provides a set of values to be used to describe the common types of SBOMs that -// tools may create. -type softwareSbomType struct { - ID string `iri:"@id"` +func (o *RelationshipList) VexNotAffectedVulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *VexNotAffectedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexNotAffectedVulnAssessmentRelationship) } -// SBOM generated through analysis of artifacts (e.g., executables, packages, containers, and virtual machine images) after its build. Such analysis generally requires a variety of heuristics. In some contexts, this may also be referred to as a "3rd party" SBOM. -var SoftwareSbomType_Analyzed = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/analyzed"} +func (o *RelationshipList) VexUnderInvestigationVulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *VexUnderInvestigationVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexUnderInvestigationVulnAssessmentRelationship) +} -// SBOM generated as part of the process of building the software to create a releasable artifact (e.g., executable or package) from data such as source files, dependencies, built components, build process ephemeral data, and other SBOMs. -var SoftwareSbomType_Build = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/build"} +func (o *RelationshipList) VexVulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *VexVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexVulnAssessmentRelationship) +} -// SBOM provides an inventory of software that is present on a system. This may be an assembly of other SBOMs that combines analysis of configuration options, and examination of execution behavior in a (potentially simulated) deployment environment. -var SoftwareSbomType_Deployed = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/deployed"} +func (o *RelationshipList) VulnAssessmentRelationships() ld.TypeSeq[AnyRelationship, *VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVulnAssessmentRelationship) +} -// SBOM of intended, planned software project or product with included components (some of which may not yet exist) for a new software artifact. -var SoftwareSbomType_Design = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/design"} +// RelationshipCompleteness Indicates whether a relationship is known to be complete, incomplete, or if no assertion is made with respect to relationship completeness. +type RelationshipCompleteness struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness"` + id string `iri:"@id"` +} -// SBOM generated through instrumenting the system running the software, to capture only components present in the system, as well as external call-outs or dynamically loaded components. In some contexts, this may also be referred to as an "Instrumented" or "Dynamic" SBOM. -var SoftwareSbomType_Runtime = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/runtime"} +// RelationshipCompleteness_Complete The relationship is known to be exhaustive. +var RelationshipCompleteness_Complete = RelationshipCompleteness{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/complete", +} -// SBOM created directly from the development environment, source files, and included dependencies used to build an product artifact. -var SoftwareSbomType_Source = softwareSbomType{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/source"} +// RelationshipCompleteness_Incomplete The relationship is known not to be exhaustive. +var RelationshipCompleteness_Incomplete = RelationshipCompleteness{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/incomplete", +} -// Provides information about the primary purpose of an Element. -type softwareSoftwarePurpose struct { - ID string `iri:"@id"` +// RelationshipCompleteness_NoAssertion No assertion can be made about the completeness of the relationship. +var RelationshipCompleteness_NoAssertion = RelationshipCompleteness{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/noAssertion", } -// The Element is a software application. -var SoftwareSoftwarePurpose_Application = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/application"} +// RelationshipType Information about the relationship between two Elements. +type RelationshipType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType"` + id string `iri:"@id"` +} -// The Element is an archived collection of one or more files (.tar, .zip, etc.). -var SoftwareSoftwarePurpose_Archive = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/archive"} +// RelationshipType_Affects The `from` Vulnerability affects each `to` Element. The use of the `affects` type is constrained to `VexAffectedVulnAssessmentRelationship` classed relationships. +var RelationshipType_Affects = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/affects", +} -// The Element is a bill of materials. -var SoftwareSoftwarePurpose_Bom = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/bom"} +// RelationshipType_AmendedBy The `from` Element is amended by each `to` Element. +var RelationshipType_AmendedBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/amendedBy", +} -// The Element is configuration data. -var SoftwareSoftwarePurpose_Configuration = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/configuration"} +// RelationshipType_AncestorOf The `from` Element is an ancestor of each `to` Element. +var RelationshipType_AncestorOf = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/ancestorOf", +} -// The Element is a container image which can be used by a container runtime application. -var SoftwareSoftwarePurpose_Container = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/container"} +// RelationshipType_AvailableFrom The `from` Element is available from the additional supplier described by each `to` Element. +var RelationshipType_AvailableFrom = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/availableFrom", +} -// The Element is data. -var SoftwareSoftwarePurpose_Data = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/data"} +// RelationshipType_Configures The `from` Element is a configuration applied to each `to` Element, during a LifecycleScopeType period. +var RelationshipType_Configures = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/configures", +} -// The Element refers to a chipset, processor, or electronic board. -var SoftwareSoftwarePurpose_Device = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/device"} +// RelationshipType_Contains The `from` Element contains each `to` Element. +var RelationshipType_Contains = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/contains", +} -// The Element represents software that controls hardware devices. -var SoftwareSoftwarePurpose_DeviceDriver = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/deviceDriver"} +// RelationshipType_CoordinatedBy The `from` Vulnerability is coordinatedBy the `to` Agent(s) (vendor, researcher, or consumer agent). +var RelationshipType_CoordinatedBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/coordinatedBy", +} -// The Element refers to a disk image that can be written to a disk, booted in a VM, etc. A disk image typically contains most or all of the components necessary to boot, such as bootloaders, kernels, firmware, userspace, etc. -var SoftwareSoftwarePurpose_DiskImage = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/diskImage"} +// RelationshipType_CopiedTo The `from` Element has been copied to each `to` Element. +var RelationshipType_CopiedTo = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/copiedTo", +} -// The Element is documentation. -var SoftwareSoftwarePurpose_Documentation = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/documentation"} +// RelationshipType_DelegatedTo The `from` Agent is delegating an action to the Agent of the `to` Relationship (which must be of type invokedBy), during a LifecycleScopeType (e.g. the `to` invokedBy Relationship is being done on behalf of `from`). +var RelationshipType_DelegatedTo = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/delegatedTo", +} -// The Element is the evidence that a specification or requirement has been fulfilled. -var SoftwareSoftwarePurpose_Evidence = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/evidence"} +// RelationshipType_DependsOn The `from` Element depends on each `to` Element, during a LifecycleScopeType period. +var RelationshipType_DependsOn = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/dependsOn", +} -// The Element is an Artifact that can be run on a computer. -var SoftwareSoftwarePurpose_Executable = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/executable"} +// RelationshipType_DescendantOf The `from` Element is a descendant of each `to` Element. +var RelationshipType_DescendantOf = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/descendantOf", +} -// The Element is a single file which can be independently distributed (configuration file, statically linked binary, Kubernetes deployment, etc.). -var SoftwareSoftwarePurpose_File = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/file"} +// RelationshipType_Describes The `from` Element describes each `to` Element. To denote the root(s) of a tree of elements in a collection, the rootElement property should be used. +var RelationshipType_Describes = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/describes", +} -// The Element is a file system image that can be written to a disk (or virtual) partition. -var SoftwareSoftwarePurpose_FilesystemImage = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/filesystemImage"} +// RelationshipType_DoesNotAffect The `from` Vulnerability has no impact on each `to` Element. The use of the `doesNotAffect` is constrained to `VexNotAffectedVulnAssessmentRelationship` classed relationships. +var RelationshipType_DoesNotAffect = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/doesNotAffect", +} -// The Element provides low level control over a device's hardware. -var SoftwareSoftwarePurpose_Firmware = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/firmware"} +// RelationshipType_ExpandsTo The `from` archive expands out as an artifact described by each `to` Element. +var RelationshipType_ExpandsTo = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/expandsTo", +} -// The Element is a software framework. -var SoftwareSoftwarePurpose_Framework = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/framework"} +// RelationshipType_ExploitCreatedBy The `from` Vulnerability has had an exploit created against it by each `to` Agent. +var RelationshipType_ExploitCreatedBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/exploitCreatedBy", +} -// The Element is used to install software on disk. -var SoftwareSoftwarePurpose_Install = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/install"} +// RelationshipType_FixedBy Designates a `from` Vulnerability has been fixed by the `to` Agent(s). +var RelationshipType_FixedBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/fixedBy", +} -// The Element is a software library. -var SoftwareSoftwarePurpose_Library = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/library"} +// RelationshipType_FixedIn A `from` Vulnerability has been fixed in each `to` Element. The use of the `fixedIn` type is constrained to `VexFixedVulnAssessmentRelationship` classed relationships. +var RelationshipType_FixedIn = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/fixedIn", +} -// The Element is a software manifest. -var SoftwareSoftwarePurpose_Manifest = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/manifest"} +// RelationshipType_FoundBy Designates a `from` Vulnerability was originally discovered by the `to` Agent(s). +var RelationshipType_FoundBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/foundBy", +} -// The Element is a machine learning or artificial intelligence model. -var SoftwareSoftwarePurpose_Model = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/model"} +// RelationshipType_Generates The `from` Element generates each `to` Element. +var RelationshipType_Generates = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/generates", +} -// The Element is a module of a piece of software. -var SoftwareSoftwarePurpose_Module = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/module"} +// RelationshipType_HasAddedFile Every `to` Element is a file added to the `from` Element (`from` hasAddedFile `to`). +var RelationshipType_HasAddedFile = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAddedFile", +} -// The Element is an operating system. -var SoftwareSoftwarePurpose_OperatingSystem = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/operatingSystem"} +// RelationshipType_HasAssessmentFor Relates a `from` Vulnerability and each `to` Element with a security assessment. To be used with `VulnAssessmentRelationship` types. +var RelationshipType_HasAssessmentFor = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAssessmentFor", +} -// The Element doesn't fit into any of the other categories. -var SoftwareSoftwarePurpose_Other = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/other"} +// RelationshipType_HasAssociatedVulnerability Used to associate a `from` Artifact with each `to` Vulnerability. +var RelationshipType_HasAssociatedVulnerability = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasAssociatedVulnerability", +} -// The Element contains a set of changes to update, fix, or improve another Element. -var SoftwareSoftwarePurpose_Patch = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/patch"} +// RelationshipType_HasConcludedLicense The `from` SoftwareArtifact is concluded by the SPDX data creator to be governed by each `to` license. +var RelationshipType_HasConcludedLicense = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasConcludedLicense", +} -// The Element represents a runtime environment. -var SoftwareSoftwarePurpose_Platform = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/platform"} +// RelationshipType_HasDataFile The `from` Element treats each `to` Element as a data file. A data file is an artifact that stores data required or optional for the `from` Element's functionality. A data file can be a database file, an index file, a log file, an AI model file, a calibration data file, a temporary file, a backup file, and more. For AI training dataset, test dataset, test artifact, configuration data, build input data, and build output data, please consider using the more specific relationship types: `trainedOn`, `testedOn`, `hasTest`, `configures`, `hasInput`, and `hasOutput`, respectively. This relationship does not imply dependency. +var RelationshipType_HasDataFile = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDataFile", +} -// The Element provides a requirement needed as input for another Element. -var SoftwareSoftwarePurpose_Requirement = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/requirement"} +// RelationshipType_HasDeclaredLicense The `from` SoftwareArtifact was discovered to actually contain each `to` license, for example as detected by use of automated tooling. +var RelationshipType_HasDeclaredLicense = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDeclaredLicense", +} -// The Element is a single or a collection of source files. -var SoftwareSoftwarePurpose_Source = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/source"} +// RelationshipType_HasDeletedFile Every `to` Element is a file deleted from the `from` Element (`from` hasDeletedFile `to`). +var RelationshipType_HasDeletedFile = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDeletedFile", +} -// The Element is a plan, guideline or strategy how to create, perform or analyze an application. -var SoftwareSoftwarePurpose_Specification = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/specification"} +// RelationshipType_HasDependencyManifest The `from` Element has manifest files that contain dependency information in each `to` Element. +var RelationshipType_HasDependencyManifest = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDependencyManifest", +} -// The Element is a test used to verify functionality on an software element. -var SoftwareSoftwarePurpose_Test = softwareSoftwarePurpose{ID: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/test"} +// RelationshipType_HasDistributionArtifact The `from` Element is distributed as an artifact in each `to` Element (e.g. an RPM or archive file). +var RelationshipType_HasDistributionArtifact = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDistributionArtifact", +} -// Class that describes a build instance of software/artifacts. -type BuildBuild struct { - Element +// RelationshipType_HasDocumentation The `from` Element is documented by each `to` Element. +var RelationshipType_HasDocumentation = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDocumentation", +} - // Property that describes the time at which a build stops. - BuildBuildEndTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildEndTime" iri-compact:"build_buildEndTime"` - // A buildId is a locally unique identifier used by a builder to identify a unique - // instance of a build produced by it. - BuildBuildId string `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildId" iri-compact:"build_buildId"` - // Property describing the start time of a build. - BuildBuildStartTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildStartTime" iri-compact:"build_buildStartTime"` - // A buildType is a hint that is used to indicate the toolchain, platform, or - // infrastructure that the build was invoked on. - BuildBuildType string `iri:"https://spdx.org/rdf/3.0.1/terms/Build/buildType" iri-compact:"build_buildType"` - // Property that describes the digest of the build configuration file used to - // invoke a build. - BuildConfigSourceDigests HashList `iri:"https://spdx.org/rdf/3.0.1/terms/Build/configSourceDigest" iri-compact:"build_configSourceDigest"` +// RelationshipType_HasDynamicLink The `from` Element dynamically links in each `to` Element, during a LifecycleScopeType period. +var RelationshipType_HasDynamicLink = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasDynamicLink", +} - // Property describes the invocation entrypoint of a build. - BuildConfigSourceEntrypoints []string `iri:"https://spdx.org/rdf/3.0.1/terms/Build/configSourceEntrypoint" iri-compact:"build_configSourceEntrypoint"` - // Property that describes the URI of the build configuration source file. - BuildConfigSourceUris []string `iri:"https://spdx.org/rdf/3.0.1/terms/Build/configSourceUri" iri-compact:"build_configSourceUri"` - // Property describing the session in which a build is invoked. - BuildEnvironments DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Build/environment" iri-compact:"build_environment"` +// RelationshipType_HasEvidence Every `to` Element is considered as evidence for the `from` Element (`from` hasEvidence `to`). +var RelationshipType_HasEvidence = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasEvidence", +} - // Property describing a parameter used in an instance of a build. - BuildParameters DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Build/parameter" iri-compact:"build_parameter"` +// RelationshipType_HasExample Every `to` Element is an example for the `from` Element (`from` hasExample `to`). +var RelationshipType_HasExample = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasExample", } -func castBuildBuild(o any) *BuildBuild { - if o, ok := o.(AnyBuildBuild); ok { - return o.asBuildBuild() - } - return nil +// RelationshipType_HasHost The `from` Build was run on the `to` Element during a LifecycleScopeType period (e.g. the host that the build runs on). +var RelationshipType_HasHost = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasHost", } -func (o *BuildBuild) asBuildBuild() *BuildBuild { - return o +// RelationshipType_HasInput The `from` Build has each `to` Element as an input, during a LifecycleScopeType period. +var RelationshipType_HasInput = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasInput", } -type AnyBuildBuild interface { - AnyElement - asBuildBuild() *BuildBuild +// RelationshipType_HasMetadata Every `to` Element is metadata about the `from` Element (`from` hasMetadata `to`). +var RelationshipType_HasMetadata = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasMetadata", } -type BuildBuildList []AnyBuildBuild +// RelationshipType_HasOptionalComponent Every `to` Element is an optional component of the `from` Element (`from` hasOptionalComponent `to`). +var RelationshipType_HasOptionalComponent = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOptionalComponent", +} -func (o *BuildBuildList) BuildBuildIter() iter.Seq2[AnyBuildBuild, *BuildBuild] { - return typeIter(*o, castBuildBuild) +// RelationshipType_HasOptionalDependency The `from` Element optionally depends on each `to` Element, during a LifecycleScopeType period. +var RelationshipType_HasOptionalDependency = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOptionalDependency", } -// Agent represents anything with the potential to act on a system. -type Agent struct { - Element +// RelationshipType_HasOutput The `from` Build element generates each `to` Element as an output, during a LifecycleScopeType period. +var RelationshipType_HasOutput = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasOutput", } -func castAgent(o any) *Agent { - if o, ok := o.(AnyAgent); ok { - return o.asAgent() - } - return nil +// RelationshipType_HasPrerequisite The `from` Element has a prerequisite on each `to` Element, during a LifecycleScopeType period. +var RelationshipType_HasPrerequisite = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasPrerequisite", } -func (o *Agent) asAgent() *Agent { - return o +// RelationshipType_HasProvidedDependency The `from` Element has a dependency on each `to` Element, dependency is not in the distributed artifact, but assumed to be provided, during a LifecycleScopeType period. +var RelationshipType_HasProvidedDependency = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasProvidedDependency", } -type AnyAgent interface { - AnyElement - asAgent() *Agent +// RelationshipType_HasRequirement The `from` Element has a requirement on each `to` Element, during a LifecycleScopeType period. +var RelationshipType_HasRequirement = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasRequirement", } -type AgentList []AnyAgent +// RelationshipType_HasSpecification Every `to` Element is a specification for the `from` Element (`from` hasSpecification `to`), during a LifecycleScopeType period. +var RelationshipType_HasSpecification = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasSpecification", +} -func (o *AgentList) AgentIter() iter.Seq2[AnyAgent, *Agent] { return typeIter(*o, castAgent) } -func (o *AgentList) OrganizationIter() iter.Seq2[AnyAgent, *Organization] { - return typeIter(*o, castOrganization) +// RelationshipType_HasStaticLink The `from` Element statically links in each `to` Element, during a LifecycleScopeType period. +var RelationshipType_HasStaticLink = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasStaticLink", } -func (o *AgentList) PersonIter() iter.Seq2[AnyAgent, *Person] { return typeIter(*o, castPerson) } -func (o *AgentList) SoftwareAgentIter() iter.Seq2[AnyAgent, *SoftwareAgent] { - return typeIter(*o, castSoftwareAgent) + +// RelationshipType_HasTest Every `to` Element is a test artifact for the `from` Element (`from` hasTest `to`), during a LifecycleScopeType period. +var RelationshipType_HasTest = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasTest", } -// An assertion made in relation to one or more elements. -type Annotation struct { - Element +// RelationshipType_HasTestCase Every `to` Element is a test case for the `from` Element (`from` hasTestCase `to`). +var RelationshipType_HasTestCase = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasTestCase", +} - // Describes the type of annotation. - AnnotationType annotationType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/annotationType" iri-compact:"annotationType"` - // Provides information about the content type of an Element or a Property. - ContentType string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/contentType" iri-compact:"contentType"` - // Commentary on an assertion that an annotator has made. - Statement string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/statement" iri-compact:"statement"` - // An Element an annotator has made an assertion about. - Subject AnyElement `iri:"https://spdx.org/rdf/3.0.1/terms/Core/subject" iri-compact:"subject"` +// RelationshipType_HasVariant Every `to` Element is a variant the `from` Element (`from` hasVariant `to`). +var RelationshipType_HasVariant = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/hasVariant", } -func castAnnotation(o any) *Annotation { - if o, ok := o.(AnyAnnotation); ok { - return o.asAnnotation() - } - return nil +// RelationshipType_InvokedBy The `from` Element was invoked by the `to` Agent, during a LifecycleScopeType period (for example, a Build element that describes a build step). +var RelationshipType_InvokedBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/invokedBy", } -func (o *Annotation) asAnnotation() *Annotation { - return o +// RelationshipType_ModifiedBy The `from` Element is modified by each `to` Element. +var RelationshipType_ModifiedBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/modifiedBy", } -type AnyAnnotation interface { - AnyElement - asAnnotation() *Annotation +// RelationshipType_Other Every `to` Element is related to the `from` Element where the relationship type is not described by any of the SPDX relationship types (this relationship is directionless). +var RelationshipType_Other = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/other", } -type AnnotationList []AnyAnnotation +// RelationshipType_PackagedBy Every `to` Element is a packaged instance of the `from` Element (`from` packagedBy `to`). +var RelationshipType_PackagedBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/packagedBy", +} -func (o *AnnotationList) AnnotationIter() iter.Seq2[AnyAnnotation, *Annotation] { - return typeIter(*o, castAnnotation) +// RelationshipType_PatchedBy Every `to` Element is a patch for the `from` Element (`from` patchedBy `to`). +var RelationshipType_PatchedBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/patchedBy", } -// A distinct article or unit within the digital domain. -type Artifact struct { - Element +// RelationshipType_PublishedBy Designates a `from` Vulnerability was made available for public use or reference by each `to` Agent. +var RelationshipType_PublishedBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/publishedBy", +} - // Specifies the time an artifact was built. - BuiltTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/builtTime" iri-compact:"builtTime"` - // Identifies from where or whom the Element originally came. - OriginatedBys AgentList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/originatedBy" iri-compact:"originatedBy"` +// RelationshipType_ReportedBy Designates a `from` Vulnerability was first reported to a project, vendor, or tracking database for formal identification by each `to` Agent. +var RelationshipType_ReportedBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/reportedBy", +} - // Specifies the time an artifact was released. - ReleaseTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/releaseTime" iri-compact:"releaseTime"` - // The name of a relevant standard that may apply to an artifact. - StandardNames []string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/standardName" iri-compact:"standardName"` - // Identifies who or what supplied the artifact or VulnAssessmentRelationship - // referenced by the Element. - SuppliedBy AnyAgent `iri:"https://spdx.org/rdf/3.0.1/terms/Core/suppliedBy" iri-compact:"suppliedBy"` +// RelationshipType_RepublishedBy Designates a `from` Vulnerability's details were tracked, aggregated, and/or enriched to improve context (i.e. NVD) by each `to` Agent. +var RelationshipType_RepublishedBy = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/republishedBy", +} - // Specifies the level of support associated with an artifact. - SupportLevels []supportType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/supportLevel" iri-compact:"supportLevel"` - // Specifies until when the artifact can be used before its usage needs to be - // reassessed. - ValidUntilTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Core/validUntilTime" iri-compact:"validUntilTime"` +// RelationshipType_SerializedInArtifact The `from` SpdxDocument can be found in a serialized form in each `to` Artifact. +var RelationshipType_SerializedInArtifact = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/serializedInArtifact", } -func castArtifact(o any) *Artifact { - if o, ok := o.(AnyArtifact); ok { - return o.asArtifact() - } - return nil +// RelationshipType_TestedOn The `from` Element has been tested on the `to` Element(s). +var RelationshipType_TestedOn = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/testedOn", } -func (o *Artifact) asArtifact() *Artifact { - return o +// RelationshipType_TrainedOn The `from` Element has been trained on the `to` Element(s). +var RelationshipType_TrainedOn = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/trainedOn", } -type AnyArtifact interface { - AnyElement - asArtifact() *Artifact +// RelationshipType_UnderInvestigationFor The `from` Vulnerability impact is being investigated for each `to` Element. The use of the `underInvestigationFor` type is constrained to `VexUnderInvestigationVulnAssessmentRelationship` classed relationships. +var RelationshipType_UnderInvestigationFor = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/underInvestigationFor", } -type ArtifactList []AnyArtifact +// RelationshipType_UsesTool The `from` Element uses each `to` Element as a tool, during a LifecycleScopeType period. +var RelationshipType_UsesTool = RelationshipType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/usesTool", +} -func (o *ArtifactList) ArtifactIter() iter.Seq2[AnyArtifact, *Artifact] { - return typeIter(*o, castArtifact) +// SafetyRiskAssessmentType Specifies the safety risk level. +type SafetyRiskAssessmentType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType"` + id string `iri:"@id"` } -func (o *ArtifactList) SecurityVulnerabilityIter() iter.Seq2[AnyArtifact, *SecurityVulnerability] { - return typeIter(*o, castSecurityVulnerability) + +// SafetyRiskAssessmentType_High The second-highest level of risk posed by an AI system. +var SafetyRiskAssessmentType_High = SafetyRiskAssessmentType{ + id: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/high", } -func (o *ArtifactList) SoftwareSoftwareArtifactIter() iter.Seq2[AnyArtifact, *SoftwareSoftwareArtifact] { - return typeIter(*o, castSoftwareSoftwareArtifact) + +// SafetyRiskAssessmentType_Low Low/no risk is posed by an AI system. +var SafetyRiskAssessmentType_Low = SafetyRiskAssessmentType{ + id: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/low", } -func (o *ArtifactList) SoftwareFileIter() iter.Seq2[AnyArtifact, *SoftwareFile] { - return typeIter(*o, castSoftwareFile) + +// SafetyRiskAssessmentType_Medium The third-highest level of risk posed by an AI system. +var SafetyRiskAssessmentType_Medium = SafetyRiskAssessmentType{ + id: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/medium", } -func (o *ArtifactList) SoftwarePackageIter() iter.Seq2[AnyArtifact, *SoftwarePackage] { - return typeIter(*o, castSoftwarePackage) + +// SafetyRiskAssessmentType_Serious The highest level of risk posed by an AI system. +var SafetyRiskAssessmentType_Serious = SafetyRiskAssessmentType{ + id: "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/serious", } -func (o *ArtifactList) SoftwareSnippetIter() iter.Seq2[AnyArtifact, *SoftwareSnippet] { - return typeIter(*o, castSoftwareSnippet) + +type AnySbom interface { + asSbom() *Sbom } -func (o *ArtifactList) AiAIPackageIter() iter.Seq2[AnyArtifact, *AiAIPackage] { - return typeIter(*o, castAiAIPackage) + +// Sbom A collection of SPDX Elements describing a single package. +type Sbom struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Software/Sbom"` + Bom + // SbomTypes Provides information about the type of an SBOM. + SbomTypes []SbomType `iri:"https://spdx.org/rdf/3.0.1/terms/Software/sbomType" type:"https://spdx.org/rdf/3.0.1/terms/Software/SbomType"` } -func (o *ArtifactList) DatasetDatasetPackageIter() iter.Seq2[AnyArtifact, *DatasetDatasetPackage] { - return typeIter(*o, castDatasetDatasetPackage) + +func (o *Sbom) asSbom() *Sbom { + return o } -// A collection of Elements that have a shared context. -type Bundle struct { - ElementCollection +type SbomList []AnySbom - // Gives information about the circumstances or unifying properties - // that Elements of the bundle have been assembled under. - Context string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/context" iri-compact:"context"` +func (o *SbomList) Sboms() ld.TypeSeq[AnySbom, *Sbom] { + return ld.NewTypeSeq(*o, castSbom) } -func castBundle(o any) *Bundle { - if o, ok := o.(AnyBundle); ok { - return o.asBundle() - } - return nil +// SbomType Provides a set of values to be used to describe the common types of SBOMs that\ntools may create. +type SbomType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Software/SbomType"` + id string `iri:"@id"` } -func (o *Bundle) asBundle() *Bundle { - return o +// SbomType_Analyzed SBOM generated through analysis of artifacts (e.g., executables, packages, containers, and virtual machine images) after its build. Such analysis generally requires a variety of heuristics. In some contexts, this may also be referred to as a \"3rd party\" SBOM. +var SbomType_Analyzed = SbomType{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/analyzed", } -type AnyBundle interface { - AnyElementCollection - asBundle() *Bundle +// SbomType_Build SBOM generated as part of the process of building the software to create a releasable artifact (e.g., executable or package) from data such as source files, dependencies, built components, build process ephemeral data, and other SBOMs. +var SbomType_Build = SbomType{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/build", } -type BundleList []AnyBundle - -func (o *BundleList) BundleIter() iter.Seq2[AnyBundle, *Bundle] { return typeIter(*o, castBundle) } -func (o *BundleList) BomIter() iter.Seq2[AnyBundle, *Bom] { return typeIter(*o, castBom) } -func (o *BundleList) SoftwareSbomIter() iter.Seq2[AnyBundle, *SoftwareSbom] { - return typeIter(*o, castSoftwareSbom) +// SbomType_Deployed SBOM provides an inventory of software that is present on a system. This may be an assembly of other SBOMs that combines analysis of configuration options, and examination of execution behavior in a (potentially simulated) deployment environment. +var SbomType_Deployed = SbomType{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/deployed", } -// A mathematically calculated representation of a grouping of data. -type Hash struct { - IntegrityMethod +// SbomType_Design SBOM of intended, planned software project or product with included components (some of which may not yet exist) for a new software artifact. +var SbomType_Design = SbomType{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/design", +} - // Specifies the algorithm used for calculating the hash value. - Algorithm hashAlgorithm `iri:"https://spdx.org/rdf/3.0.1/terms/Core/algorithm" iri-compact:"algorithm"` - // The result of applying a hash algorithm to an Element. - HashValue string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/hashValue" iri-compact:"hashValue"` +// SbomType_Runtime SBOM generated through instrumenting the system running the software, to capture only components present in the system, as well as external call-outs or dynamically loaded components. In some contexts, this may also be referred to as an \"Instrumented\" or \"Dynamic\" SBOM. +var SbomType_Runtime = SbomType{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/runtime", } -func castHash(o any) *Hash { - if o, ok := o.(AnyHash); ok { - return o.asHash() - } - return nil +// SbomType_Source SBOM created directly from the development environment, source files, and included dependencies used to build an product artifact. +var SbomType_Source = SbomType{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/source", } -func (o *Hash) asHash() *Hash { - return o +type AnySimpleLicensingText interface { + asSimpleLicensingText() *SimpleLicensingText } -type AnyHash interface { - AnyIntegrityMethod - asHash() *Hash +// SimpleLicensingText A license or addition that is not listed on the SPDX License List. +type SimpleLicensingText struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/SimpleLicensingText"` + Element + // LicenseText Identifies the full text of a License or Addition. + LicenseText string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseText" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` } -type HashList []AnyHash +func (o *SimpleLicensingText) asSimpleLicensingText() *SimpleLicensingText { + return o +} -func (o *HashList) HashIter() iter.Seq2[AnyHash, *Hash] { return typeIter(*o, castHash) } +type SimpleLicensingTextList []AnySimpleLicensingText -// Provide context for a relationship that occurs in the lifecycle. -type LifecycleScopedRelationship struct { - Relationship +func (o *SimpleLicensingTextList) SimpleLicensingTexts() ld.TypeSeq[AnySimpleLicensingText, *SimpleLicensingText] { + return ld.NewTypeSeq(*o, castSimpleLicensingText) +} - // Capture the scope of information about a specific relationship between elements. - Scope lifecycleScopeType `iri:"https://spdx.org/rdf/3.0.1/terms/Core/scope" iri-compact:"scope"` +type AnySnippet interface { + asSnippet() *Snippet } -func castLifecycleScopedRelationship(o any) *LifecycleScopedRelationship { - if o, ok := o.(AnyLifecycleScopedRelationship); ok { - return o.asLifecycleScopedRelationship() - } - return nil +// Snippet Describes a certain part of a file. +type Snippet struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Software/Snippet"` + SoftwareArtifact + // SnippetFromFile Defines the original host file that the snippet information applies to. + SnippetFromFile AnyFile `iri:"https://spdx.org/rdf/3.0.1/terms/Software/snippetFromFile" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Software/File"` + // LineRange Defines the line range in the original host file that the snippet information\napplies to. + LineRange AnyPositiveIntegerRange `iri:"https://spdx.org/rdf/3.0.1/terms/Software/lineRange" type:"https://spdx.org/rdf/3.0.1/terms/Core/PositiveIntegerRange"` + // ByteRange Defines the byte range in the original host file that the snippet information\napplies to. + ByteRange AnyPositiveIntegerRange `iri:"https://spdx.org/rdf/3.0.1/terms/Software/byteRange" type:"https://spdx.org/rdf/3.0.1/terms/Core/PositiveIntegerRange"` } -func (o *LifecycleScopedRelationship) asLifecycleScopedRelationship() *LifecycleScopedRelationship { +func (o *Snippet) asSnippet() *Snippet { return o } -type AnyLifecycleScopedRelationship interface { - AnyRelationship - asLifecycleScopedRelationship() *LifecycleScopedRelationship -} +type SnippetList []AnySnippet -type LifecycleScopedRelationshipList []AnyLifecycleScopedRelationship +func (o *SnippetList) Snippets() ld.TypeSeq[AnySnippet, *Snippet] { + return ld.NewTypeSeq(*o, castSnippet) +} -func (o *LifecycleScopedRelationshipList) LifecycleScopedRelationshipIter() iter.Seq2[AnyLifecycleScopedRelationship, *LifecycleScopedRelationship] { - return typeIter(*o, castLifecycleScopedRelationship) +type AnySoftwareAgent interface { + asSoftwareAgent() *SoftwareAgent } -// A group of people who work together in an organized way for a shared purpose. -type Organization struct { +// SoftwareAgent A software agent. +type SoftwareAgent struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/SoftwareAgent"` Agent } -// An Organization representing the SPDX Project. -var Organization_SpdxOrganization = Organization{Agent: Agent{Element: Element{ID: "https://spdx.org/rdf/3.0.1/terms/Core/SpdxOrganization"}}} +func (o *SoftwareAgent) asSoftwareAgent() *SoftwareAgent { + return o +} -func castOrganization(o any) *Organization { - if o, ok := o.(AnyOrganization); ok { - return o.asOrganization() - } - return nil +type SoftwareAgentList []AnySoftwareAgent + +func (o *SoftwareAgentList) SoftwareAgents() ld.TypeSeq[AnySoftwareAgent, *SoftwareAgent] { + return ld.NewTypeSeq(*o, castSoftwareAgent) } -func (o *Organization) asOrganization() *Organization { +type AnySoftwareArtifact interface { + asSoftwareArtifact() *SoftwareArtifact +} + +// SoftwareArtifact A distinct article or unit related to Software. +type SoftwareArtifact struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Software/SoftwareArtifact"` + Artifact + // ContentIdentifiers A canonical, unique, immutable identifier of the artifact content, that may be\nused for verifying its identity and/or integrity. + ContentIdentifiers ContentIdentifierList `iri:"https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifier" type:"https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifier"` + // AttributionTexts Provides a place for the SPDX data creator to record acknowledgement text for\na software Package, File or Snippet. + AttributionTexts []string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/attributionText" type:"http://www.w3.org/2001/XMLSchema#string"` + // AdditionalPurposes Provides additional purpose information of the software artifact. + AdditionalPurposes []SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.1/terms/Software/additionalPurpose" type:"https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose"` + // PrimaryPurpose Provides information about the primary purpose of the software artifact. + PrimaryPurpose SoftwarePurpose `iri:"https://spdx.org/rdf/3.0.1/terms/Software/primaryPurpose" type:"https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose"` + // CopyrightText Identifies the text of one or more copyright notices for a software Package,\nFile or Snippet, if any. + CopyrightText string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/copyrightText" type:"http://www.w3.org/2001/XMLSchema#string"` +} + +func (o *SoftwareArtifact) asSoftwareArtifact() *SoftwareArtifact { return o } -type AnyOrganization interface { - AnyAgent - asOrganization() *Organization +type SoftwareArtifactList []AnySoftwareArtifact + +func (o *SoftwareArtifactList) AIPackages() ld.TypeSeq[AnySoftwareArtifact, *AIPackage] { + return ld.NewTypeSeq(*o, castAIPackage) } -type OrganizationList []AnyOrganization +func (o *SoftwareArtifactList) DatasetPackages() ld.TypeSeq[AnySoftwareArtifact, *DatasetPackage] { + return ld.NewTypeSeq(*o, castDatasetPackage) +} -func (o *OrganizationList) OrganizationIter() iter.Seq2[AnyOrganization, *Organization] { - return typeIter(*o, castOrganization) +func (o *SoftwareArtifactList) Files() ld.TypeSeq[AnySoftwareArtifact, *File] { + return ld.NewTypeSeq(*o, castFile) } -// An individual human being. -type Person struct { - Agent +func (o *SoftwareArtifactList) Packages() ld.TypeSeq[AnySoftwareArtifact, *Package] { + return ld.NewTypeSeq(*o, castPackage) } -func castPerson(o any) *Person { - if o, ok := o.(AnyPerson); ok { - return o.asPerson() - } - return nil +func (o *SoftwareArtifactList) Snippets() ld.TypeSeq[AnySoftwareArtifact, *Snippet] { + return ld.NewTypeSeq(*o, castSnippet) } -func (o *Person) asPerson() *Person { - return o +func (o *SoftwareArtifactList) SoftwareArtifacts() ld.TypeSeq[AnySoftwareArtifact, *SoftwareArtifact] { + return ld.NewTypeSeq(*o, castSoftwareArtifact) } -type AnyPerson interface { - AnyAgent - asPerson() *Person +// SoftwarePurpose Provides information about the primary purpose of an Element. +type SoftwarePurpose struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose"` + id string `iri:"@id"` } -type PersonList []AnyPerson +// SoftwarePurpose_Application The Element is a software application. +var SoftwarePurpose_Application = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/application", +} -func (o *PersonList) PersonIter() iter.Seq2[AnyPerson, *Person] { return typeIter(*o, castPerson) } +// SoftwarePurpose_Archive The Element is an archived collection of one or more files (.tar, .zip, etc.). +var SoftwarePurpose_Archive = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/archive", +} -// A software agent. -type SoftwareAgent struct { - Agent +// SoftwarePurpose_Bom The Element is a bill of materials. +var SoftwarePurpose_Bom = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/bom", } -func castSoftwareAgent(o any) *SoftwareAgent { - if o, ok := o.(AnySoftwareAgent); ok { - return o.asSoftwareAgent() - } - return nil +// SoftwarePurpose_Configuration The Element is configuration data. +var SoftwarePurpose_Configuration = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/configuration", } -func (o *SoftwareAgent) asSoftwareAgent() *SoftwareAgent { - return o +// SoftwarePurpose_Container The Element is a container image which can be used by a container runtime application. +var SoftwarePurpose_Container = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/container", } -type AnySoftwareAgent interface { - AnyAgent - asSoftwareAgent() *SoftwareAgent +// SoftwarePurpose_Data The Element is data. +var SoftwarePurpose_Data = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/data", } -type SoftwareAgentList []AnySoftwareAgent +// SoftwarePurpose_Device The Element refers to a chipset, processor, or electronic board. +var SoftwarePurpose_Device = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/device", +} -func (o *SoftwareAgentList) SoftwareAgentIter() iter.Seq2[AnySoftwareAgent, *SoftwareAgent] { - return typeIter(*o, castSoftwareAgent) +// SoftwarePurpose_DeviceDriver The Element represents software that controls hardware devices. +var SoftwarePurpose_DeviceDriver = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/deviceDriver", } -// Portion of an AnyLicenseInfo representing a set of licensing information -// where all elements apply. -type ExpandedlicensingConjunctiveLicenseSet struct { - SimplelicensingAnyLicenseInfo +// SoftwarePurpose_DiskImage The Element refers to a disk image that can be written to a disk, booted in a VM, etc. A disk image typically contains most or all of the components necessary to boot, such as bootloaders, kernels, firmware, userspace, etc. +var SoftwarePurpose_DiskImage = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/diskImage", +} - // A license expression participating in a license set. - ExpandedlicensingMembers SimplelicensingAnyLicenseInfoList `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/member" iri-compact:"expandedlicensing_member"` +// SoftwarePurpose_Documentation The Element is documentation. +var SoftwarePurpose_Documentation = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/documentation", } -func castExpandedlicensingConjunctiveLicenseSet(o any) *ExpandedlicensingConjunctiveLicenseSet { - if o, ok := o.(AnyExpandedlicensingConjunctiveLicenseSet); ok { - return o.asExpandedlicensingConjunctiveLicenseSet() - } - return nil +// SoftwarePurpose_Evidence The Element is the evidence that a specification or requirement has been fulfilled. +var SoftwarePurpose_Evidence = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/evidence", } -func (o *ExpandedlicensingConjunctiveLicenseSet) asExpandedlicensingConjunctiveLicenseSet() *ExpandedlicensingConjunctiveLicenseSet { - return o +// SoftwarePurpose_Executable The Element is an Artifact that can be run on a computer. +var SoftwarePurpose_Executable = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/executable", } -type AnyExpandedlicensingConjunctiveLicenseSet interface { - AnySimplelicensingAnyLicenseInfo - asExpandedlicensingConjunctiveLicenseSet() *ExpandedlicensingConjunctiveLicenseSet +// SoftwarePurpose_File The Element is a single file which can be independently distributed (configuration file, statically linked binary, Kubernetes deployment, etc.). +var SoftwarePurpose_File = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/file", } -type ExpandedlicensingConjunctiveLicenseSetList []AnyExpandedlicensingConjunctiveLicenseSet +// SoftwarePurpose_FilesystemImage The Element is a file system image that can be written to a disk (or virtual) partition. +var SoftwarePurpose_FilesystemImage = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/filesystemImage", +} -func (o *ExpandedlicensingConjunctiveLicenseSetList) ExpandedlicensingConjunctiveLicenseSetIter() iter.Seq2[AnyExpandedlicensingConjunctiveLicenseSet, *ExpandedlicensingConjunctiveLicenseSet] { - return typeIter(*o, castExpandedlicensingConjunctiveLicenseSet) +// SoftwarePurpose_Firmware The Element provides low level control over a device's hardware. +var SoftwarePurpose_Firmware = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/firmware", } -// A license addition that is not listed on the SPDX Exceptions List. -type ExpandedlicensingCustomLicenseAddition struct { - ExpandedlicensingLicenseAddition +// SoftwarePurpose_Framework The Element is a software framework. +var SoftwarePurpose_Framework = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/framework", } -func castExpandedlicensingCustomLicenseAddition(o any) *ExpandedlicensingCustomLicenseAddition { - if o, ok := o.(AnyExpandedlicensingCustomLicenseAddition); ok { - return o.asExpandedlicensingCustomLicenseAddition() - } - return nil +// SoftwarePurpose_Install The Element is used to install software on disk. +var SoftwarePurpose_Install = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/install", } -func (o *ExpandedlicensingCustomLicenseAddition) asExpandedlicensingCustomLicenseAddition() *ExpandedlicensingCustomLicenseAddition { - return o +// SoftwarePurpose_Library The Element is a software library. +var SoftwarePurpose_Library = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/library", } -type AnyExpandedlicensingCustomLicenseAddition interface { - AnyExpandedlicensingLicenseAddition - asExpandedlicensingCustomLicenseAddition() *ExpandedlicensingCustomLicenseAddition +// SoftwarePurpose_Manifest The Element is a software manifest. +var SoftwarePurpose_Manifest = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/manifest", } -type ExpandedlicensingCustomLicenseAdditionList []AnyExpandedlicensingCustomLicenseAddition +// SoftwarePurpose_Model The Element is a machine learning or artificial intelligence model. +var SoftwarePurpose_Model = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/model", +} -func (o *ExpandedlicensingCustomLicenseAdditionList) ExpandedlicensingCustomLicenseAdditionIter() iter.Seq2[AnyExpandedlicensingCustomLicenseAddition, *ExpandedlicensingCustomLicenseAddition] { - return typeIter(*o, castExpandedlicensingCustomLicenseAddition) +// SoftwarePurpose_Module The Element is a module of a piece of software. +var SoftwarePurpose_Module = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/module", } -// Portion of an AnyLicenseInfo representing a set of licensing information where -// only one of the elements applies. -type ExpandedlicensingDisjunctiveLicenseSet struct { - SimplelicensingAnyLicenseInfo +// SoftwarePurpose_OperatingSystem The Element is an operating system. +var SoftwarePurpose_OperatingSystem = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/operatingSystem", +} - // A license expression participating in a license set. - ExpandedlicensingMembers SimplelicensingAnyLicenseInfoList `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/member" iri-compact:"expandedlicensing_member"` +// SoftwarePurpose_Other The Element doesn't fit into any of the other categories. +var SoftwarePurpose_Other = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/other", } -func castExpandedlicensingDisjunctiveLicenseSet(o any) *ExpandedlicensingDisjunctiveLicenseSet { - if o, ok := o.(AnyExpandedlicensingDisjunctiveLicenseSet); ok { - return o.asExpandedlicensingDisjunctiveLicenseSet() - } - return nil +// SoftwarePurpose_Patch The Element contains a set of changes to update, fix, or improve another Element. +var SoftwarePurpose_Patch = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/patch", } -func (o *ExpandedlicensingDisjunctiveLicenseSet) asExpandedlicensingDisjunctiveLicenseSet() *ExpandedlicensingDisjunctiveLicenseSet { - return o +// SoftwarePurpose_Platform The Element represents a runtime environment. +var SoftwarePurpose_Platform = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/platform", } -type AnyExpandedlicensingDisjunctiveLicenseSet interface { - AnySimplelicensingAnyLicenseInfo - asExpandedlicensingDisjunctiveLicenseSet() *ExpandedlicensingDisjunctiveLicenseSet +// SoftwarePurpose_Requirement The Element provides a requirement needed as input for another Element. +var SoftwarePurpose_Requirement = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/requirement", } -type ExpandedlicensingDisjunctiveLicenseSetList []AnyExpandedlicensingDisjunctiveLicenseSet +// SoftwarePurpose_Source The Element is a single or a collection of source files. +var SoftwarePurpose_Source = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/source", +} -func (o *ExpandedlicensingDisjunctiveLicenseSetList) ExpandedlicensingDisjunctiveLicenseSetIter() iter.Seq2[AnyExpandedlicensingDisjunctiveLicenseSet, *ExpandedlicensingDisjunctiveLicenseSet] { - return typeIter(*o, castExpandedlicensingDisjunctiveLicenseSet) +// SoftwarePurpose_Specification The Element is a plan, guideline or strategy how to create, perform or analyze an application. +var SoftwarePurpose_Specification = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/specification", } -// Abstract class representing a License or an OrLaterOperator. -type ExpandedlicensingExtendableLicense struct { - SimplelicensingAnyLicenseInfo +// SoftwarePurpose_Test The Element is a test used to verify functionality on an software element. +var SoftwarePurpose_Test = SoftwarePurpose{ + id: "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/test", } -func castExpandedlicensingExtendableLicense(o any) *ExpandedlicensingExtendableLicense { - if o, ok := o.(AnyExpandedlicensingExtendableLicense); ok { - return o.asExpandedlicensingExtendableLicense() - } - return nil +type AnySpdxDocument interface { + asSpdxDocument() *SpdxDocument } -func (o *ExpandedlicensingExtendableLicense) asExpandedlicensingExtendableLicense() *ExpandedlicensingExtendableLicense { - return o +// SpdxDocument A collection of SPDX Elements that could potentially be serialized. +type SpdxDocument struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/SpdxDocument"` + ElementCollection + // DataLicense Provides the license under which the SPDX documentation of the Element can be\nused. + DataLicense AnyLicenseInfo `iri:"https://spdx.org/rdf/3.0.1/terms/Core/dataLicense" type:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/AnyLicenseInfo"` + // NamespaceMaps Provides a NamespaceMap of prefixes and associated namespace partial URIs applicable to an SpdxDocument and independent of any specific serialization format or instance. + NamespaceMaps NamespaceMapList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/namespaceMap" type:"https://spdx.org/rdf/3.0.1/terms/Core/NamespaceMap"` + // Imports Provides an ExternalMap of Element identifiers. + Imports ExternalMapList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/import" type:"https://spdx.org/rdf/3.0.1/terms/Core/ExternalMap"` } -type AnyExpandedlicensingExtendableLicense interface { - AnySimplelicensingAnyLicenseInfo - asExpandedlicensingExtendableLicense() *ExpandedlicensingExtendableLicense +func (o *SpdxDocument) asSpdxDocument() *SpdxDocument { + return o } -type ExpandedlicensingExtendableLicenseList []AnyExpandedlicensingExtendableLicense +type SpdxDocumentList []AnySpdxDocument -func (o *ExpandedlicensingExtendableLicenseList) ExpandedlicensingExtendableLicenseIter() iter.Seq2[AnyExpandedlicensingExtendableLicense, *ExpandedlicensingExtendableLicense] { - return typeIter(*o, castExpandedlicensingExtendableLicense) +func (o *SpdxDocumentList) SpdxDocuments() ld.TypeSeq[AnySpdxDocument, *SpdxDocument] { + return ld.NewTypeSeq(*o, castSpdxDocument) } -func (o *ExpandedlicensingExtendableLicenseList) ExpandedlicensingLicenseIter() iter.Seq2[AnyExpandedlicensingExtendableLicense, *ExpandedlicensingLicense] { - return typeIter(*o, castExpandedlicensingLicense) -} -func (o *ExpandedlicensingExtendableLicenseList) ExpandedlicensingListedLicenseIter() iter.Seq2[AnyExpandedlicensingExtendableLicense, *ExpandedlicensingListedLicense] { - return typeIter(*o, castExpandedlicensingListedLicense) + +// SsvcDecisionType Specifies the SSVC decision type. +type SsvcDecisionType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType"` + id string `iri:"@id"` } -func (o *ExpandedlicensingExtendableLicenseList) ExpandedlicensingOrLaterOperatorIter() iter.Seq2[AnyExpandedlicensingExtendableLicense, *ExpandedlicensingOrLaterOperator] { - return typeIter(*o, castExpandedlicensingOrLaterOperator) + +// SsvcDecisionType_Act The vulnerability requires attention from the organization's internal, supervisory-level and leadership-level individuals. Necessary actions include requesting assistance or information about the vulnerability, as well as publishing a notification either internally and/or externally. Typically, internal groups would meet to determine the overall response and then execute agreed upon actions. CISA recommends remediating Act vulnerabilities as soon as possible. +var SsvcDecisionType_Act = SsvcDecisionType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/act", } -func (o *ExpandedlicensingExtendableLicenseList) ExpandedlicensingCustomLicenseIter() iter.Seq2[AnyExpandedlicensingExtendableLicense, *ExpandedlicensingCustomLicense] { - return typeIter(*o, castExpandedlicensingCustomLicense) + +// SsvcDecisionType_Attend The vulnerability requires attention from the organization's internal, supervisory-level individuals. Necessary actions include requesting assistance or information about the vulnerability, and may involve publishing a notification either internally and/or externally. CISA recommends remediating Attend vulnerabilities sooner than standard update timelines. +var SsvcDecisionType_Attend = SsvcDecisionType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/attend", } -// A concrete subclass of AnyLicenseInfo used by Individuals in the -// ExpandedLicensing profile. -type ExpandedlicensingIndividualLicensingInfo struct { - SimplelicensingAnyLicenseInfo +// SsvcDecisionType_Track The vulnerability does not require action at this time. The organization would continue to track the vulnerability and reassess it if new information becomes available. CISA recommends remediating Track vulnerabilities within standard update timelines. +var SsvcDecisionType_Track = SsvcDecisionType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/track", } -// An Individual Value for License when no assertion can be made about its actual -// value. -var ExpandedlicensingIndividualLicensingInfo_NoAssertionLicense = ExpandedlicensingIndividualLicensingInfo{SimplelicensingAnyLicenseInfo: SimplelicensingAnyLicenseInfo{Element: Element{ID: "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/NoAssertionLicense"}}} +// SsvcDecisionType_TrackStar (\"Track\\*\" in the SSVC spec) The vulnerability contains specific characteristics that may require closer monitoring for changes. CISA recommends remediating Track\\* vulnerabilities within standard update timelines. +var SsvcDecisionType_TrackStar = SsvcDecisionType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/trackStar", +} -// An Individual Value for License where the SPDX data creator determines that no -// license is present. -var ExpandedlicensingIndividualLicensingInfo_NoneLicense = ExpandedlicensingIndividualLicensingInfo{SimplelicensingAnyLicenseInfo: SimplelicensingAnyLicenseInfo{Element: Element{ID: "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/NoneLicense"}}} +type AnySsvcVulnAssessmentRelationship interface { + asSsvcVulnAssessmentRelationship() *SsvcVulnAssessmentRelationship +} -func castExpandedlicensingIndividualLicensingInfo(o any) *ExpandedlicensingIndividualLicensingInfo { - if o, ok := o.(AnyExpandedlicensingIndividualLicensingInfo); ok { - return o.asExpandedlicensingIndividualLicensingInfo() - } - return nil +// SsvcVulnAssessmentRelationship Provides an SSVC assessment for a vulnerability. +type SsvcVulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/SsvcVulnAssessmentRelationship"` + VulnAssessmentRelationship + // DecisionType Provide the enumeration of possible decisions in the\n[Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree](https://www.cisa.gov/stakeholder-specific-vulnerability-categorization-ssvc). + DecisionType SsvcDecisionType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/decisionType" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType"` } -func (o *ExpandedlicensingIndividualLicensingInfo) asExpandedlicensingIndividualLicensingInfo() *ExpandedlicensingIndividualLicensingInfo { +func (o *SsvcVulnAssessmentRelationship) asSsvcVulnAssessmentRelationship() *SsvcVulnAssessmentRelationship { return o } -type AnyExpandedlicensingIndividualLicensingInfo interface { - AnySimplelicensingAnyLicenseInfo - asExpandedlicensingIndividualLicensingInfo() *ExpandedlicensingIndividualLicensingInfo +type SsvcVulnAssessmentRelationshipList []AnySsvcVulnAssessmentRelationship + +func (o *SsvcVulnAssessmentRelationshipList) SsvcVulnAssessmentRelationships() ld.TypeSeq[AnySsvcVulnAssessmentRelationship, *SsvcVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castSsvcVulnAssessmentRelationship) } -type ExpandedlicensingIndividualLicensingInfoList []AnyExpandedlicensingIndividualLicensingInfo +// SupportType Indicates the type of support that is associated with an artifact. +type SupportType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/SupportType"` + id string `iri:"@id"` +} -func (o *ExpandedlicensingIndividualLicensingInfoList) ExpandedlicensingIndividualLicensingInfoIter() iter.Seq2[AnyExpandedlicensingIndividualLicensingInfo, *ExpandedlicensingIndividualLicensingInfo] { - return typeIter(*o, castExpandedlicensingIndividualLicensingInfo) +// SupportType_Deployed in addition to being supported by the supplier, the software is known to have been deployed and is in use. For a software as a service provider, this implies the software is now available as a service. +var SupportType_Deployed = SupportType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/deployed", } -// Abstract class for the portion of an AnyLicenseInfo representing a license. -type ExpandedlicensingLicense struct { - ExpandedlicensingExtendableLicense +// SupportType_Development the artifact is in active development and is not considered ready for formal support from the supplier. +var SupportType_Development = SupportType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/development", +} - // Specifies whether a license or additional text identifier has been marked as - // deprecated. - ExpandedlicensingIsDeprecatedLicenseId bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isDeprecatedLicenseId" iri-compact:"expandedlicensing_isDeprecatedLicenseId"` - // Specifies whether the License is listed as free by the - // Free Software Foundation (FSF). - ExpandedlicensingIsFsfLibre bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isFsfLibre" iri-compact:"expandedlicensing_isFsfLibre"` - // Specifies whether the License is listed as approved by the - // Open Source Initiative (OSI). - ExpandedlicensingIsOsiApproved bool `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isOsiApproved" iri-compact:"expandedlicensing_isOsiApproved"` - // Identifies all the text and metadata associated with a license in the license - // XML format. - ExpandedlicensingLicenseXml string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/licenseXml" iri-compact:"expandedlicensing_licenseXml"` - // Specifies the licenseId that is preferred to be used in place of a deprecated - // License or LicenseAddition. - ExpandedlicensingObsoletedBy string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/obsoletedBy" iri-compact:"expandedlicensing_obsoletedBy"` - // Contains a URL where the License or LicenseAddition can be found in use. - ExpandedlicensingSeeAlsos []string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/seeAlso" iri-compact:"expandedlicensing_seeAlso"` - // Provides a License author's preferred text to indicate that a file is covered - // by the License. - ExpandedlicensingStandardLicenseHeader string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardLicenseHeader" iri-compact:"expandedlicensing_standardLicenseHeader"` - // Identifies the full text of a License, in SPDX templating format. - ExpandedlicensingStandardLicenseTemplate string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardLicenseTemplate" iri-compact:"expandedlicensing_standardLicenseTemplate"` - // Identifies the full text of a License or Addition. - SimplelicensingLicenseText string `iri:"https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseText" iri-compact:"simplelicensing_licenseText"` +// SupportType_EndOfSupport there is a defined end of support for the artifact from the supplier. This may also be referred to as end of life. There is a validUntilDate that can be used to signal when support ends for the artifact. +var SupportType_EndOfSupport = SupportType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/endOfSupport", } -func castExpandedlicensingLicense(o any) *ExpandedlicensingLicense { - if o, ok := o.(AnyExpandedlicensingLicense); ok { - return o.asExpandedlicensingLicense() - } - return nil +// SupportType_LimitedSupport the artifact has been released, and there is limited support available from the supplier. There is a validUntilDate that can provide additional information about the duration of support. +var SupportType_LimitedSupport = SupportType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/limitedSupport", } -func (o *ExpandedlicensingLicense) asExpandedlicensingLicense() *ExpandedlicensingLicense { - return o +// SupportType_NoAssertion no assertion about the type of support is made. This is considered the default if no other support type is used. +var SupportType_NoAssertion = SupportType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/noAssertion", } -type AnyExpandedlicensingLicense interface { - AnyExpandedlicensingExtendableLicense - asExpandedlicensingLicense() *ExpandedlicensingLicense +// SupportType_NoSupport there is no support for the artifact from the supplier, consumer assumes any support obligations. +var SupportType_NoSupport = SupportType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/noSupport", } -type ExpandedlicensingLicenseList []AnyExpandedlicensingLicense +// SupportType_Support the artifact has been released, and is supported from the supplier. There is a validUntilDate that can provide additional information about the duration of support. +var SupportType_Support = SupportType{ + id: "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/support", +} -func (o *ExpandedlicensingLicenseList) ExpandedlicensingLicenseIter() iter.Seq2[AnyExpandedlicensingLicense, *ExpandedlicensingLicense] { - return typeIter(*o, castExpandedlicensingLicense) +type AnyTool interface { + asTool() *Tool } -func (o *ExpandedlicensingLicenseList) ExpandedlicensingListedLicenseIter() iter.Seq2[AnyExpandedlicensingLicense, *ExpandedlicensingListedLicense] { - return typeIter(*o, castExpandedlicensingListedLicense) + +// Tool An element of hardware and/or software utilized to carry out a particular function. +type Tool struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Core/Tool"` + Element } -func (o *ExpandedlicensingLicenseList) ExpandedlicensingCustomLicenseIter() iter.Seq2[AnyExpandedlicensingLicense, *ExpandedlicensingCustomLicense] { - return typeIter(*o, castExpandedlicensingCustomLicense) + +func (o *Tool) asTool() *Tool { + return o } -// A license that is listed on the SPDX License List. -type ExpandedlicensingListedLicense struct { - ExpandedlicensingLicense +type ToolList []AnyTool - // Specifies the SPDX License List version in which this license or exception - // identifier was deprecated. - ExpandedlicensingDeprecatedVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/deprecatedVersion" iri-compact:"expandedlicensing_deprecatedVersion"` - // Specifies the SPDX License List version in which this ListedLicense or - // ListedLicenseException identifier was first added. - ExpandedlicensingListVersionAdded string `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/listVersionAdded" iri-compact:"expandedlicensing_listVersionAdded"` +func (o *ToolList) Tools() ld.TypeSeq[AnyTool, *Tool] { + return ld.NewTypeSeq(*o, castTool) } -func castExpandedlicensingListedLicense(o any) *ExpandedlicensingListedLicense { - if o, ok := o.(AnyExpandedlicensingListedLicense); ok { - return o.asExpandedlicensingListedLicense() - } - return nil +type AnyVexAffectedVulnAssessmentRelationship interface { + asVexAffectedVulnAssessmentRelationship() *VexAffectedVulnAssessmentRelationship } -func (o *ExpandedlicensingListedLicense) asExpandedlicensingListedLicense() *ExpandedlicensingListedLicense { - return o +// VexAffectedVulnAssessmentRelationship Connects a vulnerability and an element designating the element as a product\naffected by the vulnerability. +type VexAffectedVulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/VexAffectedVulnAssessmentRelationship"` + VexVulnAssessmentRelationship + // ActionStatement Provides advise on how to mitigate or remediate a vulnerability when a VEX product\nis affected by it. + ActionStatement string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/actionStatement" required:"true" type:"http://www.w3.org/2001/XMLSchema#string"` + // ActionStatementTime Records the time when a recommended action was communicated in a VEX statement\nto mitigate a vulnerability. + ActionStatementTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/actionStatementTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` } -type AnyExpandedlicensingListedLicense interface { - AnyExpandedlicensingLicense - asExpandedlicensingListedLicense() *ExpandedlicensingListedLicense +func (o *VexAffectedVulnAssessmentRelationship) asVexAffectedVulnAssessmentRelationship() *VexAffectedVulnAssessmentRelationship { + return o } -type ExpandedlicensingListedLicenseList []AnyExpandedlicensingListedLicense +type VexAffectedVulnAssessmentRelationshipList []AnyVexAffectedVulnAssessmentRelationship -func (o *ExpandedlicensingListedLicenseList) ExpandedlicensingListedLicenseIter() iter.Seq2[AnyExpandedlicensingListedLicense, *ExpandedlicensingListedLicense] { - return typeIter(*o, castExpandedlicensingListedLicense) +func (o *VexAffectedVulnAssessmentRelationshipList) VexAffectedVulnAssessmentRelationships() ld.TypeSeq[AnyVexAffectedVulnAssessmentRelationship, *VexAffectedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexAffectedVulnAssessmentRelationship) } -// Portion of an AnyLicenseInfo representing this version, or any later version, -// of the indicated License. -type ExpandedlicensingOrLaterOperator struct { - ExpandedlicensingExtendableLicense - - // A License participating in an 'or later' model. - ExpandedlicensingSubjectLicense AnyExpandedlicensingLicense `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectLicense" iri-compact:"expandedlicensing_subjectLicense"` +type AnyVexFixedVulnAssessmentRelationship interface { + asVexFixedVulnAssessmentRelationship() *VexFixedVulnAssessmentRelationship } -func castExpandedlicensingOrLaterOperator(o any) *ExpandedlicensingOrLaterOperator { - if o, ok := o.(AnyExpandedlicensingOrLaterOperator); ok { - return o.asExpandedlicensingOrLaterOperator() - } - return nil +// VexFixedVulnAssessmentRelationship Links a vulnerability and elements representing products (in the VEX sense) where\na fix has been applied and are no longer affected. +type VexFixedVulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/VexFixedVulnAssessmentRelationship"` + VexVulnAssessmentRelationship } -func (o *ExpandedlicensingOrLaterOperator) asExpandedlicensingOrLaterOperator() *ExpandedlicensingOrLaterOperator { +func (o *VexFixedVulnAssessmentRelationship) asVexFixedVulnAssessmentRelationship() *VexFixedVulnAssessmentRelationship { return o } -type AnyExpandedlicensingOrLaterOperator interface { - AnyExpandedlicensingExtendableLicense - asExpandedlicensingOrLaterOperator() *ExpandedlicensingOrLaterOperator -} +type VexFixedVulnAssessmentRelationshipList []AnyVexFixedVulnAssessmentRelationship -type ExpandedlicensingOrLaterOperatorList []AnyExpandedlicensingOrLaterOperator +func (o *VexFixedVulnAssessmentRelationshipList) VexFixedVulnAssessmentRelationships() ld.TypeSeq[AnyVexFixedVulnAssessmentRelationship, *VexFixedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexFixedVulnAssessmentRelationship) +} -func (o *ExpandedlicensingOrLaterOperatorList) ExpandedlicensingOrLaterOperatorIter() iter.Seq2[AnyExpandedlicensingOrLaterOperator, *ExpandedlicensingOrLaterOperator] { - return typeIter(*o, castExpandedlicensingOrLaterOperator) +// VexJustificationType Specifies the VEX justification type. +type VexJustificationType struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType"` + id string `iri:"@id"` } -// Portion of an AnyLicenseInfo representing a License which has additional -// text applied to it. -type ExpandedlicensingWithAdditionOperator struct { - SimplelicensingAnyLicenseInfo +// VexJustificationType_ComponentNotPresent The software is not affected because the vulnerable component is not in the product. +var VexJustificationType_ComponentNotPresent = VexJustificationType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/componentNotPresent", +} - // A LicenseAddition participating in a 'with addition' model. - ExpandedlicensingSubjectAddition AnyExpandedlicensingLicenseAddition `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectAddition" iri-compact:"expandedlicensing_subjectAddition"` +// VexJustificationType_InlineMitigationsAlreadyExist Built-in inline controls or mitigations prevent an adversary from leveraging the vulnerability. +var VexJustificationType_InlineMitigationsAlreadyExist = VexJustificationType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/inlineMitigationsAlreadyExist", +} - // A License participating in a 'with addition' model. - ExpandedlicensingSubjectExtendableLicense AnyExpandedlicensingExtendableLicense `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectExtendableLicense" iri-compact:"expandedlicensing_subjectExtendableLicense"` +// VexJustificationType_VulnerableCodeCannotBeControlledByAdversary The vulnerable component is present, and the component contains the vulnerable code. However, vulnerable code is used in such a way that an attacker cannot mount any anticipated attack. +var VexJustificationType_VulnerableCodeCannotBeControlledByAdversary = VexJustificationType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeCannotBeControlledByAdversary", } -func castExpandedlicensingWithAdditionOperator(o any) *ExpandedlicensingWithAdditionOperator { - if o, ok := o.(AnyExpandedlicensingWithAdditionOperator); ok { - return o.asExpandedlicensingWithAdditionOperator() - } - return nil +// VexJustificationType_VulnerableCodeNotInExecutePath The affected code is not reachable through the execution of the code, including non-anticipated states of the product. +var VexJustificationType_VulnerableCodeNotInExecutePath = VexJustificationType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeNotInExecutePath", } -func (o *ExpandedlicensingWithAdditionOperator) asExpandedlicensingWithAdditionOperator() *ExpandedlicensingWithAdditionOperator { - return o +// VexJustificationType_VulnerableCodeNotPresent The product is not affected because the code underlying the vulnerability is not present in the product. +var VexJustificationType_VulnerableCodeNotPresent = VexJustificationType{ + id: "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/vulnerableCodeNotPresent", } -type AnyExpandedlicensingWithAdditionOperator interface { - AnySimplelicensingAnyLicenseInfo - asExpandedlicensingWithAdditionOperator() *ExpandedlicensingWithAdditionOperator +type AnyVexNotAffectedVulnAssessmentRelationship interface { + asVexNotAffectedVulnAssessmentRelationship() *VexNotAffectedVulnAssessmentRelationship } -type ExpandedlicensingWithAdditionOperatorList []AnyExpandedlicensingWithAdditionOperator +// VexNotAffectedVulnAssessmentRelationship Links a vulnerability and one or more elements designating the latter as products\nnot affected by the vulnerability. +type VexNotAffectedVulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/VexNotAffectedVulnAssessmentRelationship"` + VexVulnAssessmentRelationship + // ImpactStatementTime Timestamp of impact statement. + ImpactStatementTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/impactStatementTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` + // ImpactStatement Explains why a VEX product is not affected by a vulnerability. It is an\nalternative in VexNotAffectedVulnAssessmentRelationship to the machine-readable\njustification label. + ImpactStatement string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/impactStatement" type:"http://www.w3.org/2001/XMLSchema#string"` + // JustificationType Impact justification label to be used when linking a vulnerability to an element\nrepresenting a VEX product with a VexNotAffectedVulnAssessmentRelationship\nrelationship. + JustificationType VexJustificationType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/justificationType" type:"https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType"` +} -func (o *ExpandedlicensingWithAdditionOperatorList) ExpandedlicensingWithAdditionOperatorIter() iter.Seq2[AnyExpandedlicensingWithAdditionOperator, *ExpandedlicensingWithAdditionOperator] { - return typeIter(*o, castExpandedlicensingWithAdditionOperator) +func (o *VexNotAffectedVulnAssessmentRelationship) asVexNotAffectedVulnAssessmentRelationship() *VexNotAffectedVulnAssessmentRelationship { + return o } -// A type of extension consisting of a list of name value pairs. -type ExtensionCdxPropertiesExtension struct { - ExtensionExtension +type VexNotAffectedVulnAssessmentRelationshipList []AnyVexNotAffectedVulnAssessmentRelationship - // Provides a map of a property names to a values. - ExtensionCdxPropertys ExtensionCdxPropertyEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/cdxProperty" iri-compact:"extension_cdxProperty"` +func (o *VexNotAffectedVulnAssessmentRelationshipList) VexNotAffectedVulnAssessmentRelationships() ld.TypeSeq[AnyVexNotAffectedVulnAssessmentRelationship, *VexNotAffectedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexNotAffectedVulnAssessmentRelationship) } -func castExtensionCdxPropertiesExtension(o any) *ExtensionCdxPropertiesExtension { - if o, ok := o.(AnyExtensionCdxPropertiesExtension); ok { - return o.asExtensionCdxPropertiesExtension() - } - return nil +type AnyVexUnderInvestigationVulnAssessmentRelationship interface { + asVexUnderInvestigationVulnAssessmentRelationship() *VexUnderInvestigationVulnAssessmentRelationship } -func (o *ExtensionCdxPropertiesExtension) asExtensionCdxPropertiesExtension() *ExtensionCdxPropertiesExtension { - return o +// VexUnderInvestigationVulnAssessmentRelationship Designates elements as products where the impact of a vulnerability is being\ninvestigated. +type VexUnderInvestigationVulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/VexUnderInvestigationVulnAssessmentRelationship"` + VexVulnAssessmentRelationship } -type AnyExtensionCdxPropertiesExtension interface { - AnyExtensionExtension - asExtensionCdxPropertiesExtension() *ExtensionCdxPropertiesExtension +func (o *VexUnderInvestigationVulnAssessmentRelationship) asVexUnderInvestigationVulnAssessmentRelationship() *VexUnderInvestigationVulnAssessmentRelationship { + return o } -type ExtensionCdxPropertiesExtensionList []AnyExtensionCdxPropertiesExtension +type VexUnderInvestigationVulnAssessmentRelationshipList []AnyVexUnderInvestigationVulnAssessmentRelationship -func (o *ExtensionCdxPropertiesExtensionList) ExtensionCdxPropertiesExtensionIter() iter.Seq2[AnyExtensionCdxPropertiesExtension, *ExtensionCdxPropertiesExtension] { - return typeIter(*o, castExtensionCdxPropertiesExtension) +func (o *VexUnderInvestigationVulnAssessmentRelationshipList) VexUnderInvestigationVulnAssessmentRelationships() ld.TypeSeq[AnyVexUnderInvestigationVulnAssessmentRelationship, *VexUnderInvestigationVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexUnderInvestigationVulnAssessmentRelationship) } -// Provides a CVSS version 2.0 assessment for a vulnerability. -type SecurityCvssV2VulnAssessmentRelationship struct { - SecurityVulnAssessmentRelationship - - // Provides a numerical (0-10) representation of the severity of a vulnerability. - SecurityScore float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/score" iri-compact:"security_score"` - // Specifies the CVSS vector string for a vulnerability. - SecurityVectorString string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vectorString" iri-compact:"security_vectorString"` +type AnyVexVulnAssessmentRelationship interface { + asVexVulnAssessmentRelationship() *VexVulnAssessmentRelationship } -func castSecurityCvssV2VulnAssessmentRelationship(o any) *SecurityCvssV2VulnAssessmentRelationship { - if o, ok := o.(AnySecurityCvssV2VulnAssessmentRelationship); ok { - return o.asSecurityCvssV2VulnAssessmentRelationship() - } - return nil +// VexVulnAssessmentRelationship Abstract ancestor class for all VEX relationships +type VexVulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/VexVulnAssessmentRelationship"` + VulnAssessmentRelationship + // StatusNotes Conveys information about how VEX status was determined. + StatusNotes string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/statusNotes" type:"http://www.w3.org/2001/XMLSchema#string"` + // VexVersion Specifies the version of a VEX statement. + VexVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vexVersion" type:"http://www.w3.org/2001/XMLSchema#string"` } -func (o *SecurityCvssV2VulnAssessmentRelationship) asSecurityCvssV2VulnAssessmentRelationship() *SecurityCvssV2VulnAssessmentRelationship { +func (o *VexVulnAssessmentRelationship) asVexVulnAssessmentRelationship() *VexVulnAssessmentRelationship { return o } -type AnySecurityCvssV2VulnAssessmentRelationship interface { - AnySecurityVulnAssessmentRelationship - asSecurityCvssV2VulnAssessmentRelationship() *SecurityCvssV2VulnAssessmentRelationship -} +type VexVulnAssessmentRelationshipList []AnyVexVulnAssessmentRelationship -type SecurityCvssV2VulnAssessmentRelationshipList []AnySecurityCvssV2VulnAssessmentRelationship +func (o *VexVulnAssessmentRelationshipList) VexAffectedVulnAssessmentRelationships() ld.TypeSeq[AnyVexVulnAssessmentRelationship, *VexAffectedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexAffectedVulnAssessmentRelationship) +} -func (o *SecurityCvssV2VulnAssessmentRelationshipList) SecurityCvssV2VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityCvssV2VulnAssessmentRelationship, *SecurityCvssV2VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV2VulnAssessmentRelationship) +func (o *VexVulnAssessmentRelationshipList) VexFixedVulnAssessmentRelationships() ld.TypeSeq[AnyVexVulnAssessmentRelationship, *VexFixedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexFixedVulnAssessmentRelationship) } -// Provides a CVSS version 3 assessment for a vulnerability. -type SecurityCvssV3VulnAssessmentRelationship struct { - SecurityVulnAssessmentRelationship +func (o *VexVulnAssessmentRelationshipList) VexNotAffectedVulnAssessmentRelationships() ld.TypeSeq[AnyVexVulnAssessmentRelationship, *VexNotAffectedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexNotAffectedVulnAssessmentRelationship) +} - // Provides a numerical (0-10) representation of the severity of a vulnerability. - SecurityScore float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/score" iri-compact:"security_score"` - // Specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. - SecuritySeverity securityCvssSeverityType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/severity" iri-compact:"security_severity"` - // Specifies the CVSS vector string for a vulnerability. - SecurityVectorString string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vectorString" iri-compact:"security_vectorString"` +func (o *VexVulnAssessmentRelationshipList) VexUnderInvestigationVulnAssessmentRelationships() ld.TypeSeq[AnyVexVulnAssessmentRelationship, *VexUnderInvestigationVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexUnderInvestigationVulnAssessmentRelationship) } -func castSecurityCvssV3VulnAssessmentRelationship(o any) *SecurityCvssV3VulnAssessmentRelationship { - if o, ok := o.(AnySecurityCvssV3VulnAssessmentRelationship); ok { - return o.asSecurityCvssV3VulnAssessmentRelationship() - } - return nil +func (o *VexVulnAssessmentRelationshipList) VexVulnAssessmentRelationships() ld.TypeSeq[AnyVexVulnAssessmentRelationship, *VexVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexVulnAssessmentRelationship) } -func (o *SecurityCvssV3VulnAssessmentRelationship) asSecurityCvssV3VulnAssessmentRelationship() *SecurityCvssV3VulnAssessmentRelationship { - return o +type AnyVulnAssessmentRelationship interface { + asVulnAssessmentRelationship() *VulnAssessmentRelationship } -type AnySecurityCvssV3VulnAssessmentRelationship interface { - AnySecurityVulnAssessmentRelationship - asSecurityCvssV3VulnAssessmentRelationship() *SecurityCvssV3VulnAssessmentRelationship +// VulnAssessmentRelationship Abstract ancestor class for all vulnerability assessments +type VulnAssessmentRelationship struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/VulnAssessmentRelationship"` + Relationship + // SuppliedBy Identifies who or what supplied the artifact or VulnAssessmentRelationship\nreferenced by the Element. + SuppliedBy AnyAgent `iri:"https://spdx.org/rdf/3.0.1/terms/Core/suppliedBy" type:"https://spdx.org/rdf/3.0.1/terms/Core/Agent"` + // WithdrawnTime Specified the time and date when a vulnerability was withdrawn. + WithdrawnTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/withdrawnTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` + // AssessedElement Specifies an Element contained in a piece of software where a vulnerability was\nfound. + AssessedElement AnySoftwareArtifact `iri:"https://spdx.org/rdf/3.0.1/terms/Security/assessedElement" type:"https://spdx.org/rdf/3.0.1/terms/Software/SoftwareArtifact"` + // PublishedTime Specifies the time when a vulnerability was published. + PublishedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/publishedTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` + // ModifiedTime Specifies a time when a vulnerability assessment was modified + ModifiedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/modifiedTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` +} + +func (o *VulnAssessmentRelationship) asVulnAssessmentRelationship() *VulnAssessmentRelationship { + return o } -type SecurityCvssV3VulnAssessmentRelationshipList []AnySecurityCvssV3VulnAssessmentRelationship +type VulnAssessmentRelationshipList []AnyVulnAssessmentRelationship -func (o *SecurityCvssV3VulnAssessmentRelationshipList) SecurityCvssV3VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityCvssV3VulnAssessmentRelationship, *SecurityCvssV3VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV3VulnAssessmentRelationship) +func (o *VulnAssessmentRelationshipList) CvssV2VulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *CvssV2VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV2VulnAssessmentRelationship) } -// Provides a CVSS version 4 assessment for a vulnerability. -type SecurityCvssV4VulnAssessmentRelationship struct { - SecurityVulnAssessmentRelationship +func (o *VulnAssessmentRelationshipList) CvssV3VulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *CvssV3VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV3VulnAssessmentRelationship) +} - // Provides a numerical (0-10) representation of the severity of a vulnerability. - SecurityScore float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/score" iri-compact:"security_score"` - // Specifies the CVSS qualitative severity rating of a vulnerability in relation to a piece of software. - SecuritySeverity securityCvssSeverityType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/severity" iri-compact:"security_severity"` - // Specifies the CVSS vector string for a vulnerability. - SecurityVectorString string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vectorString" iri-compact:"security_vectorString"` +func (o *VulnAssessmentRelationshipList) CvssV4VulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *CvssV4VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castCvssV4VulnAssessmentRelationship) } -func castSecurityCvssV4VulnAssessmentRelationship(o any) *SecurityCvssV4VulnAssessmentRelationship { - if o, ok := o.(AnySecurityCvssV4VulnAssessmentRelationship); ok { - return o.asSecurityCvssV4VulnAssessmentRelationship() - } - return nil +func (o *VulnAssessmentRelationshipList) EpssVulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *EpssVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castEpssVulnAssessmentRelationship) } -func (o *SecurityCvssV4VulnAssessmentRelationship) asSecurityCvssV4VulnAssessmentRelationship() *SecurityCvssV4VulnAssessmentRelationship { - return o +func (o *VulnAssessmentRelationshipList) ExploitCatalogVulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *ExploitCatalogVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castExploitCatalogVulnAssessmentRelationship) } -type AnySecurityCvssV4VulnAssessmentRelationship interface { - AnySecurityVulnAssessmentRelationship - asSecurityCvssV4VulnAssessmentRelationship() *SecurityCvssV4VulnAssessmentRelationship +func (o *VulnAssessmentRelationshipList) SsvcVulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *SsvcVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castSsvcVulnAssessmentRelationship) } -type SecurityCvssV4VulnAssessmentRelationshipList []AnySecurityCvssV4VulnAssessmentRelationship +func (o *VulnAssessmentRelationshipList) VexAffectedVulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *VexAffectedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexAffectedVulnAssessmentRelationship) +} -func (o *SecurityCvssV4VulnAssessmentRelationshipList) SecurityCvssV4VulnAssessmentRelationshipIter() iter.Seq2[AnySecurityCvssV4VulnAssessmentRelationship, *SecurityCvssV4VulnAssessmentRelationship] { - return typeIter(*o, castSecurityCvssV4VulnAssessmentRelationship) +func (o *VulnAssessmentRelationshipList) VexFixedVulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *VexFixedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexFixedVulnAssessmentRelationship) } -// Provides an EPSS assessment for a vulnerability. -type SecurityEpssVulnAssessmentRelationship struct { - SecurityVulnAssessmentRelationship +func (o *VulnAssessmentRelationshipList) VexNotAffectedVulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *VexNotAffectedVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexNotAffectedVulnAssessmentRelationship) +} - // The percentile of the current probability score. - SecurityPercentile float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/percentile" iri-compact:"security_percentile"` - // A probability score between 0 and 1 of a vulnerability being exploited. - SecurityProbability float64 `iri:"https://spdx.org/rdf/3.0.1/terms/Security/probability" iri-compact:"security_probability"` +func (o *VulnAssessmentRelationshipList) VexUnderInvestigationVulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *VexUnderInvestigationVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexUnderInvestigationVulnAssessmentRelationship) } -func castSecurityEpssVulnAssessmentRelationship(o any) *SecurityEpssVulnAssessmentRelationship { - if o, ok := o.(AnySecurityEpssVulnAssessmentRelationship); ok { - return o.asSecurityEpssVulnAssessmentRelationship() - } - return nil +func (o *VulnAssessmentRelationshipList) VexVulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *VexVulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVexVulnAssessmentRelationship) } -func (o *SecurityEpssVulnAssessmentRelationship) asSecurityEpssVulnAssessmentRelationship() *SecurityEpssVulnAssessmentRelationship { - return o +func (o *VulnAssessmentRelationshipList) VulnAssessmentRelationships() ld.TypeSeq[AnyVulnAssessmentRelationship, *VulnAssessmentRelationship] { + return ld.NewTypeSeq(*o, castVulnAssessmentRelationship) } -type AnySecurityEpssVulnAssessmentRelationship interface { - AnySecurityVulnAssessmentRelationship - asSecurityEpssVulnAssessmentRelationship() *SecurityEpssVulnAssessmentRelationship +type AnyVulnerability interface { + asVulnerability() *Vulnerability } -type SecurityEpssVulnAssessmentRelationshipList []AnySecurityEpssVulnAssessmentRelationship +// Vulnerability Specifies a vulnerability and its associated information. +type Vulnerability struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Security/Vulnerability"` + Artifact + // WithdrawnTime Specified the time and date when a vulnerability was withdrawn. + WithdrawnTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/withdrawnTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` + // ModifiedTime Specifies a time when a vulnerability assessment was modified + ModifiedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/modifiedTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` + // PublishedTime Specifies the time when a vulnerability was published. + PublishedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/publishedTime" type:"http://www.w3.org/2001/XMLSchema#dateTimeStamp"` +} -func (o *SecurityEpssVulnAssessmentRelationshipList) SecurityEpssVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityEpssVulnAssessmentRelationship, *SecurityEpssVulnAssessmentRelationship] { - return typeIter(*o, castSecurityEpssVulnAssessmentRelationship) +func (o *Vulnerability) asVulnerability() *Vulnerability { + return o } -// Provides an exploit assessment of a vulnerability. -type SecurityExploitCatalogVulnAssessmentRelationship struct { - SecurityVulnAssessmentRelationship +type VulnerabilityList []AnyVulnerability - // Specifies the exploit catalog type. - SecurityCatalogType securityExploitCatalogType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/catalogType" iri-compact:"security_catalogType"` - // Describe that a CVE is known to have an exploit because it's been listed in an exploit catalog. - SecurityExploited bool `iri:"https://spdx.org/rdf/3.0.1/terms/Security/exploited" iri-compact:"security_exploited"` - // Provides the location of an exploit catalog. - SecurityLocator string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/locator" iri-compact:"security_locator"` +func (o *VulnerabilityList) Vulnerabilities() ld.TypeSeq[AnyVulnerability, *Vulnerability] { + return ld.NewTypeSeq(*o, castVulnerability) } -func castSecurityExploitCatalogVulnAssessmentRelationship(o any) *SecurityExploitCatalogVulnAssessmentRelationship { - if o, ok := o.(AnySecurityExploitCatalogVulnAssessmentRelationship); ok { - return o.asSecurityExploitCatalogVulnAssessmentRelationship() - } - return nil +type AnyWithAdditionOperator interface { + asWithAdditionOperator() *WithAdditionOperator } -func (o *SecurityExploitCatalogVulnAssessmentRelationship) asSecurityExploitCatalogVulnAssessmentRelationship() *SecurityExploitCatalogVulnAssessmentRelationship { - return o +// WithAdditionOperator Portion of an AnyLicenseInfo representing a License which has additional\ntext applied to it. +type WithAdditionOperator struct { + _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/WithAdditionOperator"` + LicenseInfo + // SubjectExtendableLicense A License participating in a 'with addition' model. + SubjectExtendableLicense AnyExtendableLicense `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectExtendableLicense" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/ExtendableLicense"` + // SubjectAddition A LicenseAddition participating in a 'with addition' model. + SubjectAddition AnyLicenseAddition `iri:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectAddition" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/LicenseAddition"` } -type AnySecurityExploitCatalogVulnAssessmentRelationship interface { - AnySecurityVulnAssessmentRelationship - asSecurityExploitCatalogVulnAssessmentRelationship() *SecurityExploitCatalogVulnAssessmentRelationship +func (o *WithAdditionOperator) asWithAdditionOperator() *WithAdditionOperator { + return o } -type SecurityExploitCatalogVulnAssessmentRelationshipList []AnySecurityExploitCatalogVulnAssessmentRelationship +type WithAdditionOperatorList []AnyWithAdditionOperator -func (o *SecurityExploitCatalogVulnAssessmentRelationshipList) SecurityExploitCatalogVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityExploitCatalogVulnAssessmentRelationship, *SecurityExploitCatalogVulnAssessmentRelationship] { - return typeIter(*o, castSecurityExploitCatalogVulnAssessmentRelationship) +func (o *WithAdditionOperatorList) WithAdditionOperators() ld.TypeSeq[AnyWithAdditionOperator, *WithAdditionOperator] { + return ld.NewTypeSeq(*o, castWithAdditionOperator) } -// Provides an SSVC assessment for a vulnerability. -type SecuritySsvcVulnAssessmentRelationship struct { - SecurityVulnAssessmentRelationship - - // Provide the enumeration of possible decisions in the - // [Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree](https://www.cisa.gov/stakeholder-specific-vulnerability-categorization-ssvc). - SecurityDecisionType securitySsvcDecisionType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/decisionType" iri-compact:"security_decisionType"` +type ExternalIRI struct { + id string `iri:"@id"` + value any } -func castSecuritySsvcVulnAssessmentRelationship(o any) *SecuritySsvcVulnAssessmentRelationship { - if o, ok := o.(AnySecuritySsvcVulnAssessmentRelationship); ok { - return o.asSecuritySsvcVulnAssessmentRelationship() +func NewExternalIRI(id string) *ExternalIRI { + return &ExternalIRI{ + id: id, } - return nil } -func (o *SecuritySsvcVulnAssessmentRelationship) asSecuritySsvcVulnAssessmentRelationship() *SecuritySsvcVulnAssessmentRelationship { - return o +func (o *ExternalIRI) asAIPackage() *AIPackage { + return castAIPackage(o.value) } -type AnySecuritySsvcVulnAssessmentRelationship interface { - AnySecurityVulnAssessmentRelationship - asSecuritySsvcVulnAssessmentRelationship() *SecuritySsvcVulnAssessmentRelationship +func (o *ExternalIRI) asAgent() *Agent { + return castAgent(o.value) } -type SecuritySsvcVulnAssessmentRelationshipList []AnySecuritySsvcVulnAssessmentRelationship - -func (o *SecuritySsvcVulnAssessmentRelationshipList) SecuritySsvcVulnAssessmentRelationshipIter() iter.Seq2[AnySecuritySsvcVulnAssessmentRelationship, *SecuritySsvcVulnAssessmentRelationship] { - return typeIter(*o, castSecuritySsvcVulnAssessmentRelationship) +func (o *ExternalIRI) asAnnotation() *Annotation { + return castAnnotation(o.value) } -// Abstract ancestor class for all VEX relationships -type SecurityVexVulnAssessmentRelationship struct { - SecurityVulnAssessmentRelationship - - // Conveys information about how VEX status was determined. - SecurityStatusNotes string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/statusNotes" iri-compact:"security_statusNotes"` - // Specifies the version of a VEX statement. - SecurityVexVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/vexVersion" iri-compact:"security_vexVersion"` +func (o *ExternalIRI) asArtifact() *Artifact { + return castArtifact(o.value) } -func castSecurityVexVulnAssessmentRelationship(o any) *SecurityVexVulnAssessmentRelationship { - if o, ok := o.(AnySecurityVexVulnAssessmentRelationship); ok { - return o.asSecurityVexVulnAssessmentRelationship() - } - return nil +func (o *ExternalIRI) asBom() *Bom { + return castBom(o.value) } -func (o *SecurityVexVulnAssessmentRelationship) asSecurityVexVulnAssessmentRelationship() *SecurityVexVulnAssessmentRelationship { - return o +func (o *ExternalIRI) asBuild() *Build { + return castBuild(o.value) } -type AnySecurityVexVulnAssessmentRelationship interface { - AnySecurityVulnAssessmentRelationship - asSecurityVexVulnAssessmentRelationship() *SecurityVexVulnAssessmentRelationship +func (o *ExternalIRI) asBundle() *Bundle { + return castBundle(o.value) } -type SecurityVexVulnAssessmentRelationshipList []AnySecurityVexVulnAssessmentRelationship +func (o *ExternalIRI) asCdxPropertiesExtension() *CdxPropertiesExtension { + return castCdxPropertiesExtension(o.value) +} -func (o *SecurityVexVulnAssessmentRelationshipList) SecurityVexVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexVulnAssessmentRelationship, *SecurityVexVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexVulnAssessmentRelationship) +func (o *ExternalIRI) asCdxPropertyEntry() *CdxPropertyEntry { + return castCdxPropertyEntry(o.value) } -func (o *SecurityVexVulnAssessmentRelationshipList) SecurityVexAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexVulnAssessmentRelationship, *SecurityVexAffectedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexAffectedVulnAssessmentRelationship) + +func (o *ExternalIRI) asConjunctiveLicenseSet() *ConjunctiveLicenseSet { + return castConjunctiveLicenseSet(o.value) } -func (o *SecurityVexVulnAssessmentRelationshipList) SecurityVexFixedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexVulnAssessmentRelationship, *SecurityVexFixedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexFixedVulnAssessmentRelationship) + +func (o *ExternalIRI) asContentIdentifier() *ContentIdentifier { + return castContentIdentifier(o.value) } -func (o *SecurityVexVulnAssessmentRelationshipList) SecurityVexNotAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexVulnAssessmentRelationship, *SecurityVexNotAffectedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexNotAffectedVulnAssessmentRelationship) + +func (o *ExternalIRI) asCreationInfo() *CreationInfo { + return castCreationInfo(o.value) } -func (o *SecurityVexVulnAssessmentRelationshipList) SecurityVexUnderInvestigationVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexVulnAssessmentRelationship, *SecurityVexUnderInvestigationVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexUnderInvestigationVulnAssessmentRelationship) + +func (o *ExternalIRI) asCustomLicense() *CustomLicense { + return castCustomLicense(o.value) } -// Specifies a vulnerability and its associated information. -type SecurityVulnerability struct { - Artifact +func (o *ExternalIRI) asCustomLicenseAddition() *CustomLicenseAddition { + return castCustomLicenseAddition(o.value) +} - // Specifies a time when a vulnerability assessment was modified - SecurityModifiedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/modifiedTime" iri-compact:"security_modifiedTime"` - // Specifies the time when a vulnerability was published. - SecurityPublishedTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/publishedTime" iri-compact:"security_publishedTime"` - // Specified the time and date when a vulnerability was withdrawn. - SecurityWithdrawnTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/withdrawnTime" iri-compact:"security_withdrawnTime"` +func (o *ExternalIRI) asCvssV2VulnAssessmentRelationship() *CvssV2VulnAssessmentRelationship { + return castCvssV2VulnAssessmentRelationship(o.value) } -func castSecurityVulnerability(o any) *SecurityVulnerability { - if o, ok := o.(AnySecurityVulnerability); ok { - return o.asSecurityVulnerability() - } - return nil +func (o *ExternalIRI) asCvssV3VulnAssessmentRelationship() *CvssV3VulnAssessmentRelationship { + return castCvssV3VulnAssessmentRelationship(o.value) } -func (o *SecurityVulnerability) asSecurityVulnerability() *SecurityVulnerability { - return o +func (o *ExternalIRI) asCvssV4VulnAssessmentRelationship() *CvssV4VulnAssessmentRelationship { + return castCvssV4VulnAssessmentRelationship(o.value) } -type AnySecurityVulnerability interface { - AnyArtifact - asSecurityVulnerability() *SecurityVulnerability +func (o *ExternalIRI) asDatasetPackage() *DatasetPackage { + return castDatasetPackage(o.value) } -type SecurityVulnerabilityList []AnySecurityVulnerability +func (o *ExternalIRI) asDictionaryEntry() *DictionaryEntry { + return castDictionaryEntry(o.value) +} -func (o *SecurityVulnerabilityList) SecurityVulnerabilityIter() iter.Seq2[AnySecurityVulnerability, *SecurityVulnerability] { - return typeIter(*o, castSecurityVulnerability) +func (o *ExternalIRI) asDisjunctiveLicenseSet() *DisjunctiveLicenseSet { + return castDisjunctiveLicenseSet(o.value) } -// A distinct article or unit related to Software. -type SoftwareSoftwareArtifact struct { - Artifact +func (o *ExternalIRI) asElement() *Element { + return castElement(o.value) +} - // Provides additional purpose information of the software artifact. - SoftwareAdditionalPurposes []softwareSoftwarePurpose `iri:"https://spdx.org/rdf/3.0.1/terms/Software/additionalPurpose" iri-compact:"software_additionalPurpose"` - // Provides a place for the SPDX data creator to record acknowledgement text for - // a software Package, File or Snippet. - SoftwareAttributionTexts []string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/attributionText" iri-compact:"software_attributionText"` - // A canonical, unique, immutable identifier of the artifact content, that may be - // used for verifying its identity and/or integrity. - SoftwareContentIdentifiers SoftwareContentIdentifierList `iri:"https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifier" iri-compact:"software_contentIdentifier"` +func (o *ExternalIRI) asElementCollection() *ElementCollection { + return castElementCollection(o.value) +} - // Identifies the text of one or more copyright notices for a software Package, - // File or Snippet, if any. - SoftwareCopyrightText string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/copyrightText" iri-compact:"software_copyrightText"` - // Provides information about the primary purpose of the software artifact. - SoftwarePrimaryPurpose softwareSoftwarePurpose `iri:"https://spdx.org/rdf/3.0.1/terms/Software/primaryPurpose" iri-compact:"software_primaryPurpose"` +func (o *ExternalIRI) asEnergyConsumption() *EnergyConsumption { + return castEnergyConsumption(o.value) } -func castSoftwareSoftwareArtifact(o any) *SoftwareSoftwareArtifact { - if o, ok := o.(AnySoftwareSoftwareArtifact); ok { - return o.asSoftwareSoftwareArtifact() - } - return nil +func (o *ExternalIRI) asEnergyConsumptionDescription() *EnergyConsumptionDescription { + return castEnergyConsumptionDescription(o.value) } -func (o *SoftwareSoftwareArtifact) asSoftwareSoftwareArtifact() *SoftwareSoftwareArtifact { - return o +func (o *ExternalIRI) asEpssVulnAssessmentRelationship() *EpssVulnAssessmentRelationship { + return castEpssVulnAssessmentRelationship(o.value) } -type AnySoftwareSoftwareArtifact interface { - AnyArtifact - asSoftwareSoftwareArtifact() *SoftwareSoftwareArtifact +func (o *ExternalIRI) asExploitCatalogVulnAssessmentRelationship() *ExploitCatalogVulnAssessmentRelationship { + return castExploitCatalogVulnAssessmentRelationship(o.value) } -type SoftwareSoftwareArtifactList []AnySoftwareSoftwareArtifact +func (o *ExternalIRI) asExtendableLicense() *ExtendableLicense { + return castExtendableLicense(o.value) +} -func (o *SoftwareSoftwareArtifactList) SoftwareSoftwareArtifactIter() iter.Seq2[AnySoftwareSoftwareArtifact, *SoftwareSoftwareArtifact] { - return typeIter(*o, castSoftwareSoftwareArtifact) +func (o *ExternalIRI) asExternalIdentifier() *ExternalIdentifier { + return castExternalIdentifier(o.value) } -func (o *SoftwareSoftwareArtifactList) SoftwareFileIter() iter.Seq2[AnySoftwareSoftwareArtifact, *SoftwareFile] { - return typeIter(*o, castSoftwareFile) + +func (o *ExternalIRI) asExternalMap() *ExternalMap { + return castExternalMap(o.value) } -func (o *SoftwareSoftwareArtifactList) SoftwarePackageIter() iter.Seq2[AnySoftwareSoftwareArtifact, *SoftwarePackage] { - return typeIter(*o, castSoftwarePackage) + +func (o *ExternalIRI) asExternalRef() *ExternalRef { + return castExternalRef(o.value) } -func (o *SoftwareSoftwareArtifactList) SoftwareSnippetIter() iter.Seq2[AnySoftwareSoftwareArtifact, *SoftwareSnippet] { - return typeIter(*o, castSoftwareSnippet) + +func (o *ExternalIRI) asFile() *File { + return castFile(o.value) } -func (o *SoftwareSoftwareArtifactList) AiAIPackageIter() iter.Seq2[AnySoftwareSoftwareArtifact, *AiAIPackage] { - return typeIter(*o, castAiAIPackage) + +func (o *ExternalIRI) asHash() *Hash { + return castHash(o.value) } -func (o *SoftwareSoftwareArtifactList) DatasetDatasetPackageIter() iter.Seq2[AnySoftwareSoftwareArtifact, *DatasetDatasetPackage] { - return typeIter(*o, castDatasetDatasetPackage) + +func (o *ExternalIRI) asIndividualElement() *IndividualElement { + return castIndividualElement(o.value) } -// A container for a grouping of SPDX-3.0 content characterizing details -// (provenence, composition, licensing, etc.) about a product. -type Bom struct { - Bundle +func (o *ExternalIRI) asIndividualLicensingInfo() *IndividualLicensingInfo { + return castIndividualLicensingInfo(o.value) } -func castBom(o any) *Bom { - if o, ok := o.(AnyBom); ok { - return o.asBom() - } - return nil +func (o *ExternalIRI) asIntegrityMethod() *IntegrityMethod { + return castIntegrityMethod(o.value) } -func (o *Bom) asBom() *Bom { - return o +func (o *ExternalIRI) asLicense() *License { + return castLicense(o.value) } -type AnyBom interface { - AnyBundle - asBom() *Bom +func (o *ExternalIRI) asLicenseAddition() *LicenseAddition { + return castLicenseAddition(o.value) } -type BomList []AnyBom +func (o *ExternalIRI) asLicenseExpression() *LicenseExpression { + return castLicenseExpression(o.value) +} -func (o *BomList) BomIter() iter.Seq2[AnyBom, *Bom] { return typeIter(*o, castBom) } -func (o *BomList) SoftwareSbomIter() iter.Seq2[AnyBom, *SoftwareSbom] { - return typeIter(*o, castSoftwareSbom) +func (o *ExternalIRI) asLicenseInfo() *LicenseInfo { + return castLicenseInfo(o.value) } -// A license that is not listed on the SPDX License List. -type ExpandedlicensingCustomLicense struct { - ExpandedlicensingLicense +func (o *ExternalIRI) asLifecycleScopedRelationship() *LifecycleScopedRelationship { + return castLifecycleScopedRelationship(o.value) } -func castExpandedlicensingCustomLicense(o any) *ExpandedlicensingCustomLicense { - if o, ok := o.(AnyExpandedlicensingCustomLicense); ok { - return o.asExpandedlicensingCustomLicense() - } - return nil +func (o *ExternalIRI) asListedLicense() *ListedLicense { + return castListedLicense(o.value) } -func (o *ExpandedlicensingCustomLicense) asExpandedlicensingCustomLicense() *ExpandedlicensingCustomLicense { - return o +func (o *ExternalIRI) asListedLicenseException() *ListedLicenseException { + return castListedLicenseException(o.value) } -type AnyExpandedlicensingCustomLicense interface { - AnyExpandedlicensingLicense - asExpandedlicensingCustomLicense() *ExpandedlicensingCustomLicense +func (o *ExternalIRI) asNamespaceMap() *NamespaceMap { + return castNamespaceMap(o.value) } -type ExpandedlicensingCustomLicenseList []AnyExpandedlicensingCustomLicense +func (o *ExternalIRI) asOrLaterOperator() *OrLaterOperator { + return castOrLaterOperator(o.value) +} -func (o *ExpandedlicensingCustomLicenseList) ExpandedlicensingCustomLicenseIter() iter.Seq2[AnyExpandedlicensingCustomLicense, *ExpandedlicensingCustomLicense] { - return typeIter(*o, castExpandedlicensingCustomLicense) +func (o *ExternalIRI) asOrganization() *Organization { + return castOrganization(o.value) } -// Connects a vulnerability and an element designating the element as a product -// affected by the vulnerability. -type SecurityVexAffectedVulnAssessmentRelationship struct { - SecurityVexVulnAssessmentRelationship +func (o *ExternalIRI) asPackage() *Package { + return castPackage(o.value) +} - // Provides advise on how to mitigate or remediate a vulnerability when a VEX product - // is affected by it. - SecurityActionStatement string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/actionStatement" iri-compact:"security_actionStatement"` - // Records the time when a recommended action was communicated in a VEX statement - // to mitigate a vulnerability. - SecurityActionStatementTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/actionStatementTime" iri-compact:"security_actionStatementTime"` +func (o *ExternalIRI) asPackageVerificationCode() *PackageVerificationCode { + return castPackageVerificationCode(o.value) } -func castSecurityVexAffectedVulnAssessmentRelationship(o any) *SecurityVexAffectedVulnAssessmentRelationship { - if o, ok := o.(AnySecurityVexAffectedVulnAssessmentRelationship); ok { - return o.asSecurityVexAffectedVulnAssessmentRelationship() - } - return nil +func (o *ExternalIRI) asPerson() *Person { + return castPerson(o.value) } -func (o *SecurityVexAffectedVulnAssessmentRelationship) asSecurityVexAffectedVulnAssessmentRelationship() *SecurityVexAffectedVulnAssessmentRelationship { - return o +func (o *ExternalIRI) asPositiveIntegerRange() *PositiveIntegerRange { + return castPositiveIntegerRange(o.value) } -type AnySecurityVexAffectedVulnAssessmentRelationship interface { - AnySecurityVexVulnAssessmentRelationship - asSecurityVexAffectedVulnAssessmentRelationship() *SecurityVexAffectedVulnAssessmentRelationship +func (o *ExternalIRI) asRelationship() *Relationship { + return castRelationship(o.value) } -type SecurityVexAffectedVulnAssessmentRelationshipList []AnySecurityVexAffectedVulnAssessmentRelationship +func (o *ExternalIRI) asSbom() *Sbom { + return castSbom(o.value) +} -func (o *SecurityVexAffectedVulnAssessmentRelationshipList) SecurityVexAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexAffectedVulnAssessmentRelationship, *SecurityVexAffectedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexAffectedVulnAssessmentRelationship) +func (o *ExternalIRI) asSimpleLicensingText() *SimpleLicensingText { + return castSimpleLicensingText(o.value) } -// Links a vulnerability and elements representing products (in the VEX sense) where -// a fix has been applied and are no longer affected. -type SecurityVexFixedVulnAssessmentRelationship struct { - SecurityVexVulnAssessmentRelationship +func (o *ExternalIRI) asSnippet() *Snippet { + return castSnippet(o.value) } -func castSecurityVexFixedVulnAssessmentRelationship(o any) *SecurityVexFixedVulnAssessmentRelationship { - if o, ok := o.(AnySecurityVexFixedVulnAssessmentRelationship); ok { - return o.asSecurityVexFixedVulnAssessmentRelationship() - } - return nil +func (o *ExternalIRI) asSoftwareAgent() *SoftwareAgent { + return castSoftwareAgent(o.value) } -func (o *SecurityVexFixedVulnAssessmentRelationship) asSecurityVexFixedVulnAssessmentRelationship() *SecurityVexFixedVulnAssessmentRelationship { - return o +func (o *ExternalIRI) asSoftwareArtifact() *SoftwareArtifact { + return castSoftwareArtifact(o.value) } -type AnySecurityVexFixedVulnAssessmentRelationship interface { - AnySecurityVexVulnAssessmentRelationship - asSecurityVexFixedVulnAssessmentRelationship() *SecurityVexFixedVulnAssessmentRelationship +func (o *ExternalIRI) asSpdxDocument() *SpdxDocument { + return castSpdxDocument(o.value) } -type SecurityVexFixedVulnAssessmentRelationshipList []AnySecurityVexFixedVulnAssessmentRelationship +func (o *ExternalIRI) asSsvcVulnAssessmentRelationship() *SsvcVulnAssessmentRelationship { + return castSsvcVulnAssessmentRelationship(o.value) +} -func (o *SecurityVexFixedVulnAssessmentRelationshipList) SecurityVexFixedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexFixedVulnAssessmentRelationship, *SecurityVexFixedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexFixedVulnAssessmentRelationship) +func (o *ExternalIRI) asTool() *Tool { + return castTool(o.value) } -// Links a vulnerability and one or more elements designating the latter as products -// not affected by the vulnerability. -type SecurityVexNotAffectedVulnAssessmentRelationship struct { - SecurityVexVulnAssessmentRelationship +func (o *ExternalIRI) asVexAffectedVulnAssessmentRelationship() *VexAffectedVulnAssessmentRelationship { + return castVexAffectedVulnAssessmentRelationship(o.value) +} - // Explains why a VEX product is not affected by a vulnerability. It is an - // alternative in VexNotAffectedVulnAssessmentRelationship to the machine-readable - // justification label. - SecurityImpactStatement string `iri:"https://spdx.org/rdf/3.0.1/terms/Security/impactStatement" iri-compact:"security_impactStatement"` - // Timestamp of impact statement. - SecurityImpactStatementTime time.Time `iri:"https://spdx.org/rdf/3.0.1/terms/Security/impactStatementTime" iri-compact:"security_impactStatementTime"` - // Impact justification label to be used when linking a vulnerability to an element - // representing a VEX product with a VexNotAffectedVulnAssessmentRelationship - // relationship. - SecurityJustificationType securityVexJustificationType `iri:"https://spdx.org/rdf/3.0.1/terms/Security/justificationType" iri-compact:"security_justificationType"` +func (o *ExternalIRI) asVexFixedVulnAssessmentRelationship() *VexFixedVulnAssessmentRelationship { + return castVexFixedVulnAssessmentRelationship(o.value) } -func castSecurityVexNotAffectedVulnAssessmentRelationship(o any) *SecurityVexNotAffectedVulnAssessmentRelationship { - if o, ok := o.(AnySecurityVexNotAffectedVulnAssessmentRelationship); ok { - return o.asSecurityVexNotAffectedVulnAssessmentRelationship() - } - return nil +func (o *ExternalIRI) asVexNotAffectedVulnAssessmentRelationship() *VexNotAffectedVulnAssessmentRelationship { + return castVexNotAffectedVulnAssessmentRelationship(o.value) } -func (o *SecurityVexNotAffectedVulnAssessmentRelationship) asSecurityVexNotAffectedVulnAssessmentRelationship() *SecurityVexNotAffectedVulnAssessmentRelationship { - return o +func (o *ExternalIRI) asVexUnderInvestigationVulnAssessmentRelationship() *VexUnderInvestigationVulnAssessmentRelationship { + return castVexUnderInvestigationVulnAssessmentRelationship(o.value) } -type AnySecurityVexNotAffectedVulnAssessmentRelationship interface { - AnySecurityVexVulnAssessmentRelationship - asSecurityVexNotAffectedVulnAssessmentRelationship() *SecurityVexNotAffectedVulnAssessmentRelationship +func (o *ExternalIRI) asVexVulnAssessmentRelationship() *VexVulnAssessmentRelationship { + return castVexVulnAssessmentRelationship(o.value) } -type SecurityVexNotAffectedVulnAssessmentRelationshipList []AnySecurityVexNotAffectedVulnAssessmentRelationship +func (o *ExternalIRI) asVulnAssessmentRelationship() *VulnAssessmentRelationship { + return castVulnAssessmentRelationship(o.value) +} -func (o *SecurityVexNotAffectedVulnAssessmentRelationshipList) SecurityVexNotAffectedVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexNotAffectedVulnAssessmentRelationship, *SecurityVexNotAffectedVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexNotAffectedVulnAssessmentRelationship) +func (o *ExternalIRI) asVulnerability() *Vulnerability { + return castVulnerability(o.value) } -// Designates elements as products where the impact of a vulnerability is being -// investigated. -type SecurityVexUnderInvestigationVulnAssessmentRelationship struct { - SecurityVexVulnAssessmentRelationship +func (o *ExternalIRI) asWithAdditionOperator() *WithAdditionOperator { + return castWithAdditionOperator(o.value) } -func castSecurityVexUnderInvestigationVulnAssessmentRelationship(o any) *SecurityVexUnderInvestigationVulnAssessmentRelationship { - if o, ok := o.(AnySecurityVexUnderInvestigationVulnAssessmentRelationship); ok { - return o.asSecurityVexUnderInvestigationVulnAssessmentRelationship() +func castAIPackage(o any) *AIPackage { + if o, ok := o.(AnyAIPackage); ok { + return o.asAIPackage() } return nil } -func (o *SecurityVexUnderInvestigationVulnAssessmentRelationship) asSecurityVexUnderInvestigationVulnAssessmentRelationship() *SecurityVexUnderInvestigationVulnAssessmentRelationship { - return o +func castAgent(o any) *Agent { + if o, ok := o.(AnyAgent); ok { + return o.asAgent() + } + return nil } -type AnySecurityVexUnderInvestigationVulnAssessmentRelationship interface { - AnySecurityVexVulnAssessmentRelationship - asSecurityVexUnderInvestigationVulnAssessmentRelationship() *SecurityVexUnderInvestigationVulnAssessmentRelationship +func castAnnotation(o any) *Annotation { + if o, ok := o.(AnyAnnotation); ok { + return o.asAnnotation() + } + return nil } -type SecurityVexUnderInvestigationVulnAssessmentRelationshipList []AnySecurityVexUnderInvestigationVulnAssessmentRelationship - -func (o *SecurityVexUnderInvestigationVulnAssessmentRelationshipList) SecurityVexUnderInvestigationVulnAssessmentRelationshipIter() iter.Seq2[AnySecurityVexUnderInvestigationVulnAssessmentRelationship, *SecurityVexUnderInvestigationVulnAssessmentRelationship] { - return typeIter(*o, castSecurityVexUnderInvestigationVulnAssessmentRelationship) +func castArtifact(o any) *Artifact { + if o, ok := o.(AnyArtifact); ok { + return o.asArtifact() + } + return nil } -// Refers to any object that stores content on a computer. -type SoftwareFile struct { - SoftwareSoftwareArtifact - - // Provides information about the content type of an Element or a Property. - ContentType string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/contentType" iri-compact:"contentType"` - // Describes if a given file is a directory or non-directory kind of file. - SoftwareFileKind softwareFileKindType `iri:"https://spdx.org/rdf/3.0.1/terms/Software/fileKind" iri-compact:"software_fileKind"` +func castBom(o any) *Bom { + if o, ok := o.(AnyBom); ok { + return o.asBom() + } + return nil } -func castSoftwareFile(o any) *SoftwareFile { - if o, ok := o.(AnySoftwareFile); ok { - return o.asSoftwareFile() +func castBuild(o any) *Build { + if o, ok := o.(AnyBuild); ok { + return o.asBuild() } return nil } -func (o *SoftwareFile) asSoftwareFile() *SoftwareFile { - return o +func castBundle(o any) *Bundle { + if o, ok := o.(AnyBundle); ok { + return o.asBundle() + } + return nil } -type AnySoftwareFile interface { - AnySoftwareSoftwareArtifact - asSoftwareFile() *SoftwareFile +func castCdxPropertiesExtension(o any) *CdxPropertiesExtension { + if o, ok := o.(AnyCdxPropertiesExtension); ok { + return o.asCdxPropertiesExtension() + } + return nil } -type SoftwareFileList []AnySoftwareFile - -func (o *SoftwareFileList) SoftwareFileIter() iter.Seq2[AnySoftwareFile, *SoftwareFile] { - return typeIter(*o, castSoftwareFile) +func castCdxPropertyEntry(o any) *CdxPropertyEntry { + if o, ok := o.(AnyCdxPropertyEntry); ok { + return o.asCdxPropertyEntry() + } + return nil } -// Refers to any unit of content that can be associated with a distribution of -// software. -type SoftwarePackage struct { - SoftwareSoftwareArtifact +func castConjunctiveLicenseSet(o any) *ConjunctiveLicenseSet { + if o, ok := o.(AnyConjunctiveLicenseSet); ok { + return o.asConjunctiveLicenseSet() + } + return nil +} - // Identifies the download Uniform Resource Identifier for the package at the time - // that the document was created. - SoftwareDownloadLocation string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/downloadLocation" iri-compact:"software_downloadLocation"` - // A place for the SPDX document creator to record a website that serves as the - // package's home page. - SoftwareHomePage string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/homePage" iri-compact:"software_homePage"` - // Provides a place for the SPDX data creator to record the package URL string - // (in accordance with the Package URL specification) for a software Package. - SoftwarePackageUrl string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/packageUrl" iri-compact:"software_packageUrl"` - // Identify the version of a package. - SoftwarePackageVersion string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/packageVersion" iri-compact:"software_packageVersion"` - // Records any relevant background information or additional comments - // about the origin of the package. - SoftwareSourceInfo string `iri:"https://spdx.org/rdf/3.0.1/terms/Software/sourceInfo" iri-compact:"software_sourceInfo"` +func castContentIdentifier(o any) *ContentIdentifier { + if o, ok := o.(AnyContentIdentifier); ok { + return o.asContentIdentifier() + } + return nil } -func castSoftwarePackage(o any) *SoftwarePackage { - if o, ok := o.(AnySoftwarePackage); ok { - return o.asSoftwarePackage() +func castCreationInfo(o any) *CreationInfo { + if o, ok := o.(AnyCreationInfo); ok { + return o.asCreationInfo() } return nil } -func (o *SoftwarePackage) asSoftwarePackage() *SoftwarePackage { - return o +func castCustomLicense(o any) *CustomLicense { + if o, ok := o.(AnyCustomLicense); ok { + return o.asCustomLicense() + } + return nil } -type AnySoftwarePackage interface { - AnySoftwareSoftwareArtifact - asSoftwarePackage() *SoftwarePackage +func castCustomLicenseAddition(o any) *CustomLicenseAddition { + if o, ok := o.(AnyCustomLicenseAddition); ok { + return o.asCustomLicenseAddition() + } + return nil } -type SoftwarePackageList []AnySoftwarePackage +func castCvssV2VulnAssessmentRelationship(o any) *CvssV2VulnAssessmentRelationship { + if o, ok := o.(AnyCvssV2VulnAssessmentRelationship); ok { + return o.asCvssV2VulnAssessmentRelationship() + } + return nil +} -func (o *SoftwarePackageList) SoftwarePackageIter() iter.Seq2[AnySoftwarePackage, *SoftwarePackage] { - return typeIter(*o, castSoftwarePackage) +func castCvssV3VulnAssessmentRelationship(o any) *CvssV3VulnAssessmentRelationship { + if o, ok := o.(AnyCvssV3VulnAssessmentRelationship); ok { + return o.asCvssV3VulnAssessmentRelationship() + } + return nil } -func (o *SoftwarePackageList) AiAIPackageIter() iter.Seq2[AnySoftwarePackage, *AiAIPackage] { - return typeIter(*o, castAiAIPackage) + +func castCvssV4VulnAssessmentRelationship(o any) *CvssV4VulnAssessmentRelationship { + if o, ok := o.(AnyCvssV4VulnAssessmentRelationship); ok { + return o.asCvssV4VulnAssessmentRelationship() + } + return nil } -func (o *SoftwarePackageList) DatasetDatasetPackageIter() iter.Seq2[AnySoftwarePackage, *DatasetDatasetPackage] { - return typeIter(*o, castDatasetDatasetPackage) + +func castDatasetPackage(o any) *DatasetPackage { + if o, ok := o.(AnyDatasetPackage); ok { + return o.asDatasetPackage() + } + return nil } -// A collection of SPDX Elements describing a single package. -type SoftwareSbom struct { - Bom +func castDictionaryEntry(o any) *DictionaryEntry { + if o, ok := o.(AnyDictionaryEntry); ok { + return o.asDictionaryEntry() + } + return nil +} - // Provides information about the type of an SBOM. - SoftwareSbomTypes []softwareSbomType `iri:"https://spdx.org/rdf/3.0.1/terms/Software/sbomType" iri-compact:"software_sbomType"` +func castDisjunctiveLicenseSet(o any) *DisjunctiveLicenseSet { + if o, ok := o.(AnyDisjunctiveLicenseSet); ok { + return o.asDisjunctiveLicenseSet() + } + return nil } -func castSoftwareSbom(o any) *SoftwareSbom { - if o, ok := o.(AnySoftwareSbom); ok { - return o.asSoftwareSbom() +func castElement(o any) *Element { + if o, ok := o.(AnyElement); ok { + return o.asElement() } return nil } -func (o *SoftwareSbom) asSoftwareSbom() *SoftwareSbom { - return o +func castElementCollection(o any) *ElementCollection { + if o, ok := o.(AnyElementCollection); ok { + return o.asElementCollection() + } + return nil } -type AnySoftwareSbom interface { - AnyBom - asSoftwareSbom() *SoftwareSbom +func castEnergyConsumption(o any) *EnergyConsumption { + if o, ok := o.(AnyEnergyConsumption); ok { + return o.asEnergyConsumption() + } + return nil } -type SoftwareSbomList []AnySoftwareSbom - -func (o *SoftwareSbomList) SoftwareSbomIter() iter.Seq2[AnySoftwareSbom, *SoftwareSbom] { - return typeIter(*o, castSoftwareSbom) +func castEnergyConsumptionDescription(o any) *EnergyConsumptionDescription { + if o, ok := o.(AnyEnergyConsumptionDescription); ok { + return o.asEnergyConsumptionDescription() + } + return nil } -// Describes a certain part of a file. -type SoftwareSnippet struct { - SoftwareSoftwareArtifact - - // Defines the byte range in the original host file that the snippet information - // applies to. - SoftwareByteRange AnyPositiveIntegerRange `iri:"https://spdx.org/rdf/3.0.1/terms/Software/byteRange" iri-compact:"software_byteRange"` - - // Defines the line range in the original host file that the snippet information - // applies to. - SoftwareLineRange AnyPositiveIntegerRange `iri:"https://spdx.org/rdf/3.0.1/terms/Software/lineRange" iri-compact:"software_lineRange"` - - // Defines the original host file that the snippet information applies to. - SoftwareSnippetFromFile AnySoftwareFile `iri:"https://spdx.org/rdf/3.0.1/terms/Software/snippetFromFile" iri-compact:"software_snippetFromFile"` +func castEpssVulnAssessmentRelationship(o any) *EpssVulnAssessmentRelationship { + if o, ok := o.(AnyEpssVulnAssessmentRelationship); ok { + return o.asEpssVulnAssessmentRelationship() + } + return nil } -func castSoftwareSnippet(o any) *SoftwareSnippet { - if o, ok := o.(AnySoftwareSnippet); ok { - return o.asSoftwareSnippet() +func castExploitCatalogVulnAssessmentRelationship(o any) *ExploitCatalogVulnAssessmentRelationship { + if o, ok := o.(AnyExploitCatalogVulnAssessmentRelationship); ok { + return o.asExploitCatalogVulnAssessmentRelationship() } return nil } -func (o *SoftwareSnippet) asSoftwareSnippet() *SoftwareSnippet { - return o +func castExtendableLicense(o any) *ExtendableLicense { + if o, ok := o.(AnyExtendableLicense); ok { + return o.asExtendableLicense() + } + return nil } -type AnySoftwareSnippet interface { - AnySoftwareSoftwareArtifact - asSoftwareSnippet() *SoftwareSnippet +func castExternalIdentifier(o any) *ExternalIdentifier { + if o, ok := o.(AnyExternalIdentifier); ok { + return o.asExternalIdentifier() + } + return nil } -type SoftwareSnippetList []AnySoftwareSnippet - -func (o *SoftwareSnippetList) SoftwareSnippetIter() iter.Seq2[AnySoftwareSnippet, *SoftwareSnippet] { - return typeIter(*o, castSoftwareSnippet) +func castExternalMap(o any) *ExternalMap { + if o, ok := o.(AnyExternalMap); ok { + return o.asExternalMap() + } + return nil } -// Specifies an AI package and its associated information. -type AiAIPackage struct { - SoftwarePackage - - // Indicates whether the system can perform a decision or action without human - // involvement or guidance. - AiAutonomyType presenceType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/autonomyType" iri-compact:"ai_autonomyType"` - // Captures the domain in which the AI package can be used. - AiDomains []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/domain" iri-compact:"ai_domain"` - // Indicates the amount of energy consumption incurred by an AI model. - AiEnergyConsumption AnyAiEnergyConsumption `iri:"https://spdx.org/rdf/3.0.1/terms/AI/energyConsumption" iri-compact:"ai_energyConsumption"` - - // Records a hyperparameter used to build the AI model contained in the AI - // package. - AiHyperparameters DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/hyperparameter" iri-compact:"ai_hyperparameter"` - - // Provides relevant information about the AI software, not including the model - // description. - AiInformationAboutApplication string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/informationAboutApplication" iri-compact:"ai_informationAboutApplication"` - // Describes relevant information about different steps of the training process. - AiInformationAboutTraining string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/informationAboutTraining" iri-compact:"ai_informationAboutTraining"` - // Captures a limitation of the AI software. - AiLimitation string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/limitation" iri-compact:"ai_limitation"` - // Records the measurement of prediction quality of the AI model. - AiMetrics DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/metric" iri-compact:"ai_metric"` - - // Captures the threshold that was used for computation of a metric described in - // the metric field. - AiMetricDecisionThresholds DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/AI/metricDecisionThreshold" iri-compact:"ai_metricDecisionThreshold"` - - // Describes all the preprocessing steps applied to the training data before the - // model training. - AiModelDataPreprocessings []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/modelDataPreprocessing" iri-compact:"ai_modelDataPreprocessing"` - // Describes methods that can be used to explain the results from the AI model. - AiModelExplainabilitys []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/modelExplainability" iri-compact:"ai_modelExplainability"` - // Records the results of general safety risk assessment of the AI system. - AiSafetyRiskAssessment aiSafetyRiskAssessmentType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/safetyRiskAssessment" iri-compact:"ai_safetyRiskAssessment"` - // Captures a standard that is being complied with. - AiStandardCompliances []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/standardCompliance" iri-compact:"ai_standardCompliance"` - // Records the type of the model used in the AI software. - AiTypeOfModels []string `iri:"https://spdx.org/rdf/3.0.1/terms/AI/typeOfModel" iri-compact:"ai_typeOfModel"` - // Records if sensitive personal information is used during model training or - // could be used during the inference. - AiUseSensitivePersonalInformation presenceType `iri:"https://spdx.org/rdf/3.0.1/terms/AI/useSensitivePersonalInformation" iri-compact:"ai_useSensitivePersonalInformation"` +func castExternalRef(o any) *ExternalRef { + if o, ok := o.(AnyExternalRef); ok { + return o.asExternalRef() + } + return nil } -func castAiAIPackage(o any) *AiAIPackage { - if o, ok := o.(AnyAiAIPackage); ok { - return o.asAiAIPackage() +func castFile(o any) *File { + if o, ok := o.(AnyFile); ok { + return o.asFile() } return nil } -func (o *AiAIPackage) asAiAIPackage() *AiAIPackage { - return o +func castHash(o any) *Hash { + if o, ok := o.(AnyHash); ok { + return o.asHash() + } + return nil } -type AnyAiAIPackage interface { - AnySoftwarePackage - asAiAIPackage() *AiAIPackage +func castIndividualElement(o any) *IndividualElement { + if o, ok := o.(AnyIndividualElement); ok { + return o.asIndividualElement() + } + return nil } -type AiAIPackageList []AnyAiAIPackage - -func (o *AiAIPackageList) AiAIPackageIter() iter.Seq2[AnyAiAIPackage, *AiAIPackage] { - return typeIter(*o, castAiAIPackage) +func castIndividualLicensingInfo(o any) *IndividualLicensingInfo { + if o, ok := o.(AnyIndividualLicensingInfo); ok { + return o.asIndividualLicensingInfo() + } + return nil } -// Specifies a data package and its associated information. -type DatasetDatasetPackage struct { - SoftwarePackage - - // Describes the anonymization methods used. - DatasetAnonymizationMethodUseds []string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/anonymizationMethodUsed" iri-compact:"dataset_anonymizationMethodUsed"` - // Describes the confidentiality level of the data points contained in the dataset. - DatasetConfidentialityLevel datasetConfidentialityLevelType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/confidentialityLevel" iri-compact:"dataset_confidentialityLevel"` - // Describes how the dataset was collected. - DatasetDataCollectionProcess string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/dataCollectionProcess" iri-compact:"dataset_dataCollectionProcess"` - // Describes the preprocessing steps that were applied to the raw data to create the given dataset. - DatasetDataPreprocessings []string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/dataPreprocessing" iri-compact:"dataset_dataPreprocessing"` - // The field describes the availability of a dataset. - DatasetDatasetAvailability datasetDatasetAvailabilityType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetAvailability" iri-compact:"dataset_datasetAvailability"` - // Describes potentially noisy elements of the dataset. - DatasetDatasetNoise string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetNoise" iri-compact:"dataset_datasetNoise"` - // Captures the size of the dataset. - DatasetDatasetSize int `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetSize" iri-compact:"dataset_datasetSize"` - // Describes the type of the given dataset. - DatasetDatasetTypes []datasetDatasetType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetType" iri-compact:"dataset_datasetType"` - // Describes a mechanism to update the dataset. - DatasetDatasetUpdateMechanism string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/datasetUpdateMechanism" iri-compact:"dataset_datasetUpdateMechanism"` - // Describes if any sensitive personal information is present in the dataset. - DatasetHasSensitivePersonalInformation presenceType `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/hasSensitivePersonalInformation" iri-compact:"dataset_hasSensitivePersonalInformation"` - // Describes what the given dataset should be used for. - DatasetIntendedUse string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/intendedUse" iri-compact:"dataset_intendedUse"` - // Records the biases that the dataset is known to encompass. - DatasetKnownBias []string `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/knownBias" iri-compact:"dataset_knownBias"` - // Describes a sensor used for collecting the data. - DatasetSensors DictionaryEntryList `iri:"https://spdx.org/rdf/3.0.1/terms/Dataset/sensor" iri-compact:"dataset_sensor"` +func castIntegrityMethod(o any) *IntegrityMethod { + if o, ok := o.(AnyIntegrityMethod); ok { + return o.asIntegrityMethod() + } + return nil } -func castDatasetDatasetPackage(o any) *DatasetDatasetPackage { - if o, ok := o.(AnyDatasetDatasetPackage); ok { - return o.asDatasetDatasetPackage() +func castLicense(o any) *License { + if o, ok := o.(AnyLicense); ok { + return o.asLicense() } return nil } -func (o *DatasetDatasetPackage) asDatasetDatasetPackage() *DatasetDatasetPackage { - return o +func castLicenseAddition(o any) *LicenseAddition { + if o, ok := o.(AnyLicenseAddition); ok { + return o.asLicenseAddition() + } + return nil } -type AnyDatasetDatasetPackage interface { - AnySoftwarePackage - asDatasetDatasetPackage() *DatasetDatasetPackage +func castLicenseExpression(o any) *LicenseExpression { + if o, ok := o.(AnyLicenseExpression); ok { + return o.asLicenseExpression() + } + return nil } -type DatasetDatasetPackageList []AnyDatasetDatasetPackage +func castLicenseInfo(o any) *LicenseInfo { + if o, ok := o.(AnyLicenseInfo); ok { + return o.asLicenseInfo() + } + return nil +} -func (o *DatasetDatasetPackageList) DatasetDatasetPackageIter() iter.Seq2[AnyDatasetDatasetPackage, *DatasetDatasetPackage] { - return typeIter(*o, castDatasetDatasetPackage) +func castLifecycleScopedRelationship(o any) *LifecycleScopedRelationship { + if o, ok := o.(AnyLifecycleScopedRelationship); ok { + return o.asLifecycleScopedRelationship() + } + return nil } -type ExternalIRI struct { - iri string +func castListedLicense(o any) *ListedLicense { + if o, ok := o.(AnyListedLicense); ok { + return o.asListedLicense() + } + return nil } -func NewExternalIRI(iri string) *ExternalIRI { - return &ExternalIRI{iri: iri} +func castListedLicenseException(o any) *ListedLicenseException { + if o, ok := o.(AnyListedLicenseException); ok { + return o.asListedLicenseException() + } + return nil } -func (o *ExternalIRI) asAiEnergyConsumption() *AiEnergyConsumption { return nil } -func (o *ExternalIRI) asAiEnergyConsumptionDescription() *AiEnergyConsumptionDescription { return nil } -func (o *ExternalIRI) asCreationInfo() *CreationInfo { return nil } -func (o *ExternalIRI) asDictionaryEntry() *DictionaryEntry { return nil } -func (o *ExternalIRI) asElement() *Element { return nil } -func (o *ExternalIRI) asElementCollection() *ElementCollection { return nil } -func (o *ExternalIRI) asExternalIdentifier() *ExternalIdentifier { return nil } -func (o *ExternalIRI) asExternalMap() *ExternalMap { return nil } -func (o *ExternalIRI) asExternalRef() *ExternalRef { return nil } -func (o *ExternalIRI) asIndividualElement() *IndividualElement { return nil } -func (o *ExternalIRI) asIntegrityMethod() *IntegrityMethod { return nil } -func (o *ExternalIRI) asNamespaceMap() *NamespaceMap { return nil } -func (o *ExternalIRI) asPackageVerificationCode() *PackageVerificationCode { return nil } -func (o *ExternalIRI) asPositiveIntegerRange() *PositiveIntegerRange { return nil } -func (o *ExternalIRI) asRelationship() *Relationship { return nil } -func (o *ExternalIRI) asSpdxDocument() *SpdxDocument { return nil } -func (o *ExternalIRI) asTool() *Tool { return nil } -func (o *ExternalIRI) asExpandedlicensingLicenseAddition() *ExpandedlicensingLicenseAddition { +func castNamespaceMap(o any) *NamespaceMap { + if o, ok := o.(AnyNamespaceMap); ok { + return o.asNamespaceMap() + } return nil } -func (o *ExternalIRI) asExpandedlicensingListedLicenseException() *ExpandedlicensingListedLicenseException { + +func castOrLaterOperator(o any) *OrLaterOperator { + if o, ok := o.(AnyOrLaterOperator); ok { + return o.asOrLaterOperator() + } return nil } -func (o *ExternalIRI) asExtensionCdxPropertyEntry() *ExtensionCdxPropertyEntry { return nil } -func (o *ExternalIRI) asExtensionExtension() *ExtensionExtension { return nil } -func (o *ExternalIRI) asSecurityVulnAssessmentRelationship() *SecurityVulnAssessmentRelationship { + +func castOrganization(o any) *Organization { + if o, ok := o.(AnyOrganization); ok { + return o.asOrganization() + } return nil } -func (o *ExternalIRI) asSimplelicensingAnyLicenseInfo() *SimplelicensingAnyLicenseInfo { return nil } -func (o *ExternalIRI) asSimplelicensingLicenseExpression() *SimplelicensingLicenseExpression { + +func castPackage(o any) *Package { + if o, ok := o.(AnyPackage); ok { + return o.asPackage() + } return nil } -func (o *ExternalIRI) asSimplelicensingSimpleLicensingText() *SimplelicensingSimpleLicensingText { + +func castPackageVerificationCode(o any) *PackageVerificationCode { + if o, ok := o.(AnyPackageVerificationCode); ok { + return o.asPackageVerificationCode() + } return nil } -func (o *ExternalIRI) asSoftwareContentIdentifier() *SoftwareContentIdentifier { return nil } -func (o *ExternalIRI) asBuildBuild() *BuildBuild { return nil } -func (o *ExternalIRI) asAgent() *Agent { return nil } -func (o *ExternalIRI) asAnnotation() *Annotation { return nil } -func (o *ExternalIRI) asArtifact() *Artifact { return nil } -func (o *ExternalIRI) asBundle() *Bundle { return nil } -func (o *ExternalIRI) asHash() *Hash { return nil } -func (o *ExternalIRI) asLifecycleScopedRelationship() *LifecycleScopedRelationship { return nil } -func (o *ExternalIRI) asOrganization() *Organization { return nil } -func (o *ExternalIRI) asPerson() *Person { return nil } -func (o *ExternalIRI) asSoftwareAgent() *SoftwareAgent { return nil } -func (o *ExternalIRI) asExpandedlicensingConjunctiveLicenseSet() *ExpandedlicensingConjunctiveLicenseSet { + +func castPerson(o any) *Person { + if o, ok := o.(AnyPerson); ok { + return o.asPerson() + } return nil } -func (o *ExternalIRI) asExpandedlicensingCustomLicenseAddition() *ExpandedlicensingCustomLicenseAddition { + +func castPositiveIntegerRange(o any) *PositiveIntegerRange { + if o, ok := o.(AnyPositiveIntegerRange); ok { + return o.asPositiveIntegerRange() + } return nil } -func (o *ExternalIRI) asExpandedlicensingDisjunctiveLicenseSet() *ExpandedlicensingDisjunctiveLicenseSet { + +func castRelationship(o any) *Relationship { + if o, ok := o.(AnyRelationship); ok { + return o.asRelationship() + } return nil } -func (o *ExternalIRI) asExpandedlicensingExtendableLicense() *ExpandedlicensingExtendableLicense { + +func castSbom(o any) *Sbom { + if o, ok := o.(AnySbom); ok { + return o.asSbom() + } return nil } -func (o *ExternalIRI) asExpandedlicensingIndividualLicensingInfo() *ExpandedlicensingIndividualLicensingInfo { + +func castSimpleLicensingText(o any) *SimpleLicensingText { + if o, ok := o.(AnySimpleLicensingText); ok { + return o.asSimpleLicensingText() + } return nil } -func (o *ExternalIRI) asExpandedlicensingLicense() *ExpandedlicensingLicense { return nil } -func (o *ExternalIRI) asExpandedlicensingListedLicense() *ExpandedlicensingListedLicense { return nil } -func (o *ExternalIRI) asExpandedlicensingOrLaterOperator() *ExpandedlicensingOrLaterOperator { + +func castSnippet(o any) *Snippet { + if o, ok := o.(AnySnippet); ok { + return o.asSnippet() + } return nil } -func (o *ExternalIRI) asExpandedlicensingWithAdditionOperator() *ExpandedlicensingWithAdditionOperator { + +func castSoftwareAgent(o any) *SoftwareAgent { + if o, ok := o.(AnySoftwareAgent); ok { + return o.asSoftwareAgent() + } return nil } -func (o *ExternalIRI) asExtensionCdxPropertiesExtension() *ExtensionCdxPropertiesExtension { + +func castSoftwareArtifact(o any) *SoftwareArtifact { + if o, ok := o.(AnySoftwareArtifact); ok { + return o.asSoftwareArtifact() + } return nil } -func (o *ExternalIRI) asSecurityCvssV2VulnAssessmentRelationship() *SecurityCvssV2VulnAssessmentRelationship { + +func castSpdxDocument(o any) *SpdxDocument { + if o, ok := o.(AnySpdxDocument); ok { + return o.asSpdxDocument() + } return nil } -func (o *ExternalIRI) asSecurityCvssV3VulnAssessmentRelationship() *SecurityCvssV3VulnAssessmentRelationship { + +func castSsvcVulnAssessmentRelationship(o any) *SsvcVulnAssessmentRelationship { + if o, ok := o.(AnySsvcVulnAssessmentRelationship); ok { + return o.asSsvcVulnAssessmentRelationship() + } return nil } -func (o *ExternalIRI) asSecurityCvssV4VulnAssessmentRelationship() *SecurityCvssV4VulnAssessmentRelationship { + +func castTool(o any) *Tool { + if o, ok := o.(AnyTool); ok { + return o.asTool() + } return nil } -func (o *ExternalIRI) asSecurityEpssVulnAssessmentRelationship() *SecurityEpssVulnAssessmentRelationship { + +func castVexAffectedVulnAssessmentRelationship(o any) *VexAffectedVulnAssessmentRelationship { + if o, ok := o.(AnyVexAffectedVulnAssessmentRelationship); ok { + return o.asVexAffectedVulnAssessmentRelationship() + } return nil } -func (o *ExternalIRI) asSecurityExploitCatalogVulnAssessmentRelationship() *SecurityExploitCatalogVulnAssessmentRelationship { + +func castVexFixedVulnAssessmentRelationship(o any) *VexFixedVulnAssessmentRelationship { + if o, ok := o.(AnyVexFixedVulnAssessmentRelationship); ok { + return o.asVexFixedVulnAssessmentRelationship() + } return nil } -func (o *ExternalIRI) asSecuritySsvcVulnAssessmentRelationship() *SecuritySsvcVulnAssessmentRelationship { + +func castVexNotAffectedVulnAssessmentRelationship(o any) *VexNotAffectedVulnAssessmentRelationship { + if o, ok := o.(AnyVexNotAffectedVulnAssessmentRelationship); ok { + return o.asVexNotAffectedVulnAssessmentRelationship() + } return nil } -func (o *ExternalIRI) asSecurityVexVulnAssessmentRelationship() *SecurityVexVulnAssessmentRelationship { + +func castVexUnderInvestigationVulnAssessmentRelationship(o any) *VexUnderInvestigationVulnAssessmentRelationship { + if o, ok := o.(AnyVexUnderInvestigationVulnAssessmentRelationship); ok { + return o.asVexUnderInvestigationVulnAssessmentRelationship() + } return nil } -func (o *ExternalIRI) asSecurityVulnerability() *SecurityVulnerability { return nil } -func (o *ExternalIRI) asSoftwareSoftwareArtifact() *SoftwareSoftwareArtifact { return nil } -func (o *ExternalIRI) asBom() *Bom { return nil } -func (o *ExternalIRI) asExpandedlicensingCustomLicense() *ExpandedlicensingCustomLicense { return nil } -func (o *ExternalIRI) asSecurityVexAffectedVulnAssessmentRelationship() *SecurityVexAffectedVulnAssessmentRelationship { + +func castVexVulnAssessmentRelationship(o any) *VexVulnAssessmentRelationship { + if o, ok := o.(AnyVexVulnAssessmentRelationship); ok { + return o.asVexVulnAssessmentRelationship() + } return nil } -func (o *ExternalIRI) asSecurityVexFixedVulnAssessmentRelationship() *SecurityVexFixedVulnAssessmentRelationship { + +func castVulnAssessmentRelationship(o any) *VulnAssessmentRelationship { + if o, ok := o.(AnyVulnAssessmentRelationship); ok { + return o.asVulnAssessmentRelationship() + } return nil } -func (o *ExternalIRI) asSecurityVexNotAffectedVulnAssessmentRelationship() *SecurityVexNotAffectedVulnAssessmentRelationship { + +func castVulnerability(o any) *Vulnerability { + if o, ok := o.(AnyVulnerability); ok { + return o.asVulnerability() + } return nil } -func (o *ExternalIRI) asSecurityVexUnderInvestigationVulnAssessmentRelationship() *SecurityVexUnderInvestigationVulnAssessmentRelationship { + +func castWithAdditionOperator(o any) *WithAdditionOperator { + if o, ok := o.(AnyWithAdditionOperator); ok { + return o.asWithAdditionOperator() + } return nil } -func (o *ExternalIRI) asSoftwareFile() *SoftwareFile { return nil } -func (o *ExternalIRI) asSoftwarePackage() *SoftwarePackage { return nil } -func (o *ExternalIRI) asSoftwareSbom() *SoftwareSbom { return nil } -func (o *ExternalIRI) asSoftwareSnippet() *SoftwareSnippet { return nil } -func (o *ExternalIRI) asAiAIPackage() *AiAIPackage { return nil } -func (o *ExternalIRI) asDatasetDatasetPackage() *DatasetDatasetPackage { return nil } func cast[T any](value any) *T { var t T switch any(t).(type) { - case AiEnergyConsumption: - if v, ok := any(castAiEnergyConsumption(value)).(*T); ok { + case AIPackage: + if v, ok := any(castAIPackage(value)).(*T); ok { return v } - case AiEnergyConsumptionDescription: - if v, ok := any(castAiEnergyConsumptionDescription(value)).(*T); ok { + case Agent: + if v, ok := any(castAgent(value)).(*T); ok { return v } - case CreationInfo: - if v, ok := any(castCreationInfo(value)).(*T); ok { + case Annotation: + if v, ok := any(castAnnotation(value)).(*T); ok { return v } - case DictionaryEntry: - if v, ok := any(castDictionaryEntry(value)).(*T); ok { + case Artifact: + if v, ok := any(castArtifact(value)).(*T); ok { return v } - case Element: - if v, ok := any(castElement(value)).(*T); ok { + case Bom: + if v, ok := any(castBom(value)).(*T); ok { return v } - case ElementCollection: - if v, ok := any(castElementCollection(value)).(*T); ok { + case Build: + if v, ok := any(castBuild(value)).(*T); ok { return v } - case ExternalIdentifier: - if v, ok := any(castExternalIdentifier(value)).(*T); ok { + case Bundle: + if v, ok := any(castBundle(value)).(*T); ok { return v } - case ExternalMap: - if v, ok := any(castExternalMap(value)).(*T); ok { + case CdxPropertiesExtension: + if v, ok := any(castCdxPropertiesExtension(value)).(*T); ok { return v } - case ExternalRef: - if v, ok := any(castExternalRef(value)).(*T); ok { + case CdxPropertyEntry: + if v, ok := any(castCdxPropertyEntry(value)).(*T); ok { return v } - case IndividualElement: - if v, ok := any(castIndividualElement(value)).(*T); ok { + case ConjunctiveLicenseSet: + if v, ok := any(castConjunctiveLicenseSet(value)).(*T); ok { return v } - case IntegrityMethod: - if v, ok := any(castIntegrityMethod(value)).(*T); ok { + case ContentIdentifier: + if v, ok := any(castContentIdentifier(value)).(*T); ok { return v } - case NamespaceMap: - if v, ok := any(castNamespaceMap(value)).(*T); ok { + case CreationInfo: + if v, ok := any(castCreationInfo(value)).(*T); ok { return v } - case PackageVerificationCode: - if v, ok := any(castPackageVerificationCode(value)).(*T); ok { + case CustomLicense: + if v, ok := any(castCustomLicense(value)).(*T); ok { return v } - case PositiveIntegerRange: - if v, ok := any(castPositiveIntegerRange(value)).(*T); ok { + case CustomLicenseAddition: + if v, ok := any(castCustomLicenseAddition(value)).(*T); ok { return v } - case Relationship: - if v, ok := any(castRelationship(value)).(*T); ok { + case CvssV2VulnAssessmentRelationship: + if v, ok := any(castCvssV2VulnAssessmentRelationship(value)).(*T); ok { return v } - case SpdxDocument: - if v, ok := any(castSpdxDocument(value)).(*T); ok { + case CvssV3VulnAssessmentRelationship: + if v, ok := any(castCvssV3VulnAssessmentRelationship(value)).(*T); ok { return v } - case Tool: - if v, ok := any(castTool(value)).(*T); ok { + case CvssV4VulnAssessmentRelationship: + if v, ok := any(castCvssV4VulnAssessmentRelationship(value)).(*T); ok { return v } - case ExpandedlicensingLicenseAddition: - if v, ok := any(castExpandedlicensingLicenseAddition(value)).(*T); ok { + case DatasetPackage: + if v, ok := any(castDatasetPackage(value)).(*T); ok { return v } - case ExpandedlicensingListedLicenseException: - if v, ok := any(castExpandedlicensingListedLicenseException(value)).(*T); ok { + case DictionaryEntry: + if v, ok := any(castDictionaryEntry(value)).(*T); ok { return v } - case ExtensionCdxPropertyEntry: - if v, ok := any(castExtensionCdxPropertyEntry(value)).(*T); ok { + case DisjunctiveLicenseSet: + if v, ok := any(castDisjunctiveLicenseSet(value)).(*T); ok { return v } - case ExtensionExtension: - if v, ok := any(castExtensionExtension(value)).(*T); ok { + case Element: + if v, ok := any(castElement(value)).(*T); ok { return v } - case SecurityVulnAssessmentRelationship: - if v, ok := any(castSecurityVulnAssessmentRelationship(value)).(*T); ok { + case ElementCollection: + if v, ok := any(castElementCollection(value)).(*T); ok { return v } - case SimplelicensingAnyLicenseInfo: - if v, ok := any(castSimplelicensingAnyLicenseInfo(value)).(*T); ok { + case EnergyConsumption: + if v, ok := any(castEnergyConsumption(value)).(*T); ok { return v } - case SimplelicensingLicenseExpression: - if v, ok := any(castSimplelicensingLicenseExpression(value)).(*T); ok { + case EnergyConsumptionDescription: + if v, ok := any(castEnergyConsumptionDescription(value)).(*T); ok { return v } - case SimplelicensingSimpleLicensingText: - if v, ok := any(castSimplelicensingSimpleLicensingText(value)).(*T); ok { + case EpssVulnAssessmentRelationship: + if v, ok := any(castEpssVulnAssessmentRelationship(value)).(*T); ok { return v } - case SoftwareContentIdentifier: - if v, ok := any(castSoftwareContentIdentifier(value)).(*T); ok { + case ExploitCatalogVulnAssessmentRelationship: + if v, ok := any(castExploitCatalogVulnAssessmentRelationship(value)).(*T); ok { return v } - case BuildBuild: - if v, ok := any(castBuildBuild(value)).(*T); ok { + case ExtendableLicense: + if v, ok := any(castExtendableLicense(value)).(*T); ok { return v } - case Agent: - if v, ok := any(castAgent(value)).(*T); ok { + case ExternalIdentifier: + if v, ok := any(castExternalIdentifier(value)).(*T); ok { return v } - case Annotation: - if v, ok := any(castAnnotation(value)).(*T); ok { + case ExternalMap: + if v, ok := any(castExternalMap(value)).(*T); ok { return v } - case Artifact: - if v, ok := any(castArtifact(value)).(*T); ok { + case ExternalRef: + if v, ok := any(castExternalRef(value)).(*T); ok { return v } - case Bundle: - if v, ok := any(castBundle(value)).(*T); ok { + case File: + if v, ok := any(castFile(value)).(*T); ok { return v } case Hash: if v, ok := any(castHash(value)).(*T); ok { return v } - case LifecycleScopedRelationship: - if v, ok := any(castLifecycleScopedRelationship(value)).(*T); ok { - return v - } - case Organization: - if v, ok := any(castOrganization(value)).(*T); ok { + case IndividualElement: + if v, ok := any(castIndividualElement(value)).(*T); ok { return v } - case Person: - if v, ok := any(castPerson(value)).(*T); ok { + case IndividualLicensingInfo: + if v, ok := any(castIndividualLicensingInfo(value)).(*T); ok { return v } - case SoftwareAgent: - if v, ok := any(castSoftwareAgent(value)).(*T); ok { + case IntegrityMethod: + if v, ok := any(castIntegrityMethod(value)).(*T); ok { return v } - case ExpandedlicensingConjunctiveLicenseSet: - if v, ok := any(castExpandedlicensingConjunctiveLicenseSet(value)).(*T); ok { + case License: + if v, ok := any(castLicense(value)).(*T); ok { return v } - case ExpandedlicensingCustomLicenseAddition: - if v, ok := any(castExpandedlicensingCustomLicenseAddition(value)).(*T); ok { + case LicenseAddition: + if v, ok := any(castLicenseAddition(value)).(*T); ok { return v } - case ExpandedlicensingDisjunctiveLicenseSet: - if v, ok := any(castExpandedlicensingDisjunctiveLicenseSet(value)).(*T); ok { + case LicenseExpression: + if v, ok := any(castLicenseExpression(value)).(*T); ok { return v } - case ExpandedlicensingExtendableLicense: - if v, ok := any(castExpandedlicensingExtendableLicense(value)).(*T); ok { + case LicenseInfo: + if v, ok := any(castLicenseInfo(value)).(*T); ok { return v } - case ExpandedlicensingIndividualLicensingInfo: - if v, ok := any(castExpandedlicensingIndividualLicensingInfo(value)).(*T); ok { + case LifecycleScopedRelationship: + if v, ok := any(castLifecycleScopedRelationship(value)).(*T); ok { return v } - case ExpandedlicensingLicense: - if v, ok := any(castExpandedlicensingLicense(value)).(*T); ok { + case ListedLicense: + if v, ok := any(castListedLicense(value)).(*T); ok { return v } - case ExpandedlicensingListedLicense: - if v, ok := any(castExpandedlicensingListedLicense(value)).(*T); ok { + case ListedLicenseException: + if v, ok := any(castListedLicenseException(value)).(*T); ok { return v } - case ExpandedlicensingOrLaterOperator: - if v, ok := any(castExpandedlicensingOrLaterOperator(value)).(*T); ok { + case NamespaceMap: + if v, ok := any(castNamespaceMap(value)).(*T); ok { return v } - case ExpandedlicensingWithAdditionOperator: - if v, ok := any(castExpandedlicensingWithAdditionOperator(value)).(*T); ok { + case OrLaterOperator: + if v, ok := any(castOrLaterOperator(value)).(*T); ok { return v } - case ExtensionCdxPropertiesExtension: - if v, ok := any(castExtensionCdxPropertiesExtension(value)).(*T); ok { + case Organization: + if v, ok := any(castOrganization(value)).(*T); ok { return v } - case SecurityCvssV2VulnAssessmentRelationship: - if v, ok := any(castSecurityCvssV2VulnAssessmentRelationship(value)).(*T); ok { + case Package: + if v, ok := any(castPackage(value)).(*T); ok { return v } - case SecurityCvssV3VulnAssessmentRelationship: - if v, ok := any(castSecurityCvssV3VulnAssessmentRelationship(value)).(*T); ok { + case PackageVerificationCode: + if v, ok := any(castPackageVerificationCode(value)).(*T); ok { return v } - case SecurityCvssV4VulnAssessmentRelationship: - if v, ok := any(castSecurityCvssV4VulnAssessmentRelationship(value)).(*T); ok { + case Person: + if v, ok := any(castPerson(value)).(*T); ok { return v } - case SecurityEpssVulnAssessmentRelationship: - if v, ok := any(castSecurityEpssVulnAssessmentRelationship(value)).(*T); ok { + case PositiveIntegerRange: + if v, ok := any(castPositiveIntegerRange(value)).(*T); ok { return v } - case SecurityExploitCatalogVulnAssessmentRelationship: - if v, ok := any(castSecurityExploitCatalogVulnAssessmentRelationship(value)).(*T); ok { + case Relationship: + if v, ok := any(castRelationship(value)).(*T); ok { return v } - case SecuritySsvcVulnAssessmentRelationship: - if v, ok := any(castSecuritySsvcVulnAssessmentRelationship(value)).(*T); ok { + case Sbom: + if v, ok := any(castSbom(value)).(*T); ok { return v } - case SecurityVexVulnAssessmentRelationship: - if v, ok := any(castSecurityVexVulnAssessmentRelationship(value)).(*T); ok { + case SimpleLicensingText: + if v, ok := any(castSimpleLicensingText(value)).(*T); ok { return v } - case SecurityVulnerability: - if v, ok := any(castSecurityVulnerability(value)).(*T); ok { + case Snippet: + if v, ok := any(castSnippet(value)).(*T); ok { return v } - case SoftwareSoftwareArtifact: - if v, ok := any(castSoftwareSoftwareArtifact(value)).(*T); ok { + case SoftwareAgent: + if v, ok := any(castSoftwareAgent(value)).(*T); ok { return v } - case Bom: - if v, ok := any(castBom(value)).(*T); ok { + case SoftwareArtifact: + if v, ok := any(castSoftwareArtifact(value)).(*T); ok { return v } - case ExpandedlicensingCustomLicense: - if v, ok := any(castExpandedlicensingCustomLicense(value)).(*T); ok { + case SpdxDocument: + if v, ok := any(castSpdxDocument(value)).(*T); ok { return v } - case SecurityVexAffectedVulnAssessmentRelationship: - if v, ok := any(castSecurityVexAffectedVulnAssessmentRelationship(value)).(*T); ok { + case SsvcVulnAssessmentRelationship: + if v, ok := any(castSsvcVulnAssessmentRelationship(value)).(*T); ok { return v } - case SecurityVexFixedVulnAssessmentRelationship: - if v, ok := any(castSecurityVexFixedVulnAssessmentRelationship(value)).(*T); ok { + case Tool: + if v, ok := any(castTool(value)).(*T); ok { return v } - case SecurityVexNotAffectedVulnAssessmentRelationship: - if v, ok := any(castSecurityVexNotAffectedVulnAssessmentRelationship(value)).(*T); ok { + case VexAffectedVulnAssessmentRelationship: + if v, ok := any(castVexAffectedVulnAssessmentRelationship(value)).(*T); ok { return v } - case SecurityVexUnderInvestigationVulnAssessmentRelationship: - if v, ok := any(castSecurityVexUnderInvestigationVulnAssessmentRelationship(value)).(*T); ok { + case VexFixedVulnAssessmentRelationship: + if v, ok := any(castVexFixedVulnAssessmentRelationship(value)).(*T); ok { return v } - case SoftwareFile: - if v, ok := any(castSoftwareFile(value)).(*T); ok { + case VexNotAffectedVulnAssessmentRelationship: + if v, ok := any(castVexNotAffectedVulnAssessmentRelationship(value)).(*T); ok { return v } - case SoftwarePackage: - if v, ok := any(castSoftwarePackage(value)).(*T); ok { + case VexUnderInvestigationVulnAssessmentRelationship: + if v, ok := any(castVexUnderInvestigationVulnAssessmentRelationship(value)).(*T); ok { return v } - case SoftwareSbom: - if v, ok := any(castSoftwareSbom(value)).(*T); ok { + case VexVulnAssessmentRelationship: + if v, ok := any(castVexVulnAssessmentRelationship(value)).(*T); ok { return v } - case SoftwareSnippet: - if v, ok := any(castSoftwareSnippet(value)).(*T); ok { + case VulnAssessmentRelationship: + if v, ok := any(castVulnAssessmentRelationship(value)).(*T); ok { return v } - case AiAIPackage: - if v, ok := any(castAiAIPackage(value)).(*T); ok { + case Vulnerability: + if v, ok := any(castVulnerability(value)).(*T); ok { return v } - case DatasetDatasetPackage: - if v, ok := any(castDatasetDatasetPackage(value)).(*T); ok { + case WithAdditionOperator: + if v, ok := any(castWithAdditionOperator(value)).(*T); ok { return v } } panic("invalid type cast, unknown type: " + reflect.TypeOf(t).String()) } -func As[T any, R any](value any, f func(v *T) R) R { +func As[T any, R any](value any, fn func(v *T) R) R { v := cast[T](value) if v != nil { - return f(v) + return fn(v) } var r R return r } + +func context() ld.Context { + return ld.NewContext().Register("https://spdx.org/rdf/3.0.1/spdx-context.jsonld", map[string]any{"@context": map[string]any{ + "Agent": "https://spdx.org/rdf/3.0.1/terms/Core/Agent", + "Annotation": "https://spdx.org/rdf/3.0.1/terms/Core/Annotation", + "AnnotationType": "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType", + "Artifact": "https://spdx.org/rdf/3.0.1/terms/Core/Artifact", + "Bom": "https://spdx.org/rdf/3.0.1/terms/Core/Bom", + "Bundle": "https://spdx.org/rdf/3.0.1/terms/Core/Bundle", + "CreationInfo": "https://spdx.org/rdf/3.0.1/terms/Core/CreationInfo", + "DictionaryEntry": "https://spdx.org/rdf/3.0.1/terms/Core/DictionaryEntry", + "Element": "https://spdx.org/rdf/3.0.1/terms/Core/Element", + "ElementCollection": "https://spdx.org/rdf/3.0.1/terms/Core/ElementCollection", + "ExternalIdentifier": "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifier", + "ExternalIdentifierType": "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType", + "ExternalMap": "https://spdx.org/rdf/3.0.1/terms/Core/ExternalMap", + "ExternalRef": "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRef", + "ExternalRefType": "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType", + "Hash": "https://spdx.org/rdf/3.0.1/terms/Core/Hash", + "HashAlgorithm": "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm", + "IndividualElement": "https://spdx.org/rdf/3.0.1/terms/Core/IndividualElement", + "IntegrityMethod": "https://spdx.org/rdf/3.0.1/terms/Core/IntegrityMethod", + "LifecycleScopeType": "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType", + "LifecycleScopedRelationship": "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopedRelationship", + "NamespaceMap": "https://spdx.org/rdf/3.0.1/terms/Core/NamespaceMap", + "NoAssertionElement": "https://spdx.org/rdf/3.0.1/terms/Core/NoAssertionElement", + "NoneElement": "https://spdx.org/rdf/3.0.1/terms/Core/NoneElement", + "Organization": "https://spdx.org/rdf/3.0.1/terms/Core/Organization", + "PackageVerificationCode": "https://spdx.org/rdf/3.0.1/terms/Core/PackageVerificationCode", + "Person": "https://spdx.org/rdf/3.0.1/terms/Core/Person", + "PositiveIntegerRange": "https://spdx.org/rdf/3.0.1/terms/Core/PositiveIntegerRange", + "PresenceType": "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType", + "ProfileIdentifierType": "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType", + "Relationship": "https://spdx.org/rdf/3.0.1/terms/Core/Relationship", + "RelationshipCompleteness": "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness", + "RelationshipType": "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType", + "SoftwareAgent": "https://spdx.org/rdf/3.0.1/terms/Core/SoftwareAgent", + "SpdxDocument": "https://spdx.org/rdf/3.0.1/terms/Core/SpdxDocument", + "SpdxOrganization": "https://spdx.org/rdf/3.0.1/terms/Core/SpdxOrganization", + "SupportType": "https://spdx.org/rdf/3.0.1/terms/Core/SupportType", + "Tool": "https://spdx.org/rdf/3.0.1/terms/Core/Tool", + "ai_AIPackage": "https://spdx.org/rdf/3.0.1/terms/AI/AIPackage", + "ai_EnergyConsumption": "https://spdx.org/rdf/3.0.1/terms/AI/EnergyConsumption", + "ai_EnergyConsumptionDescription": "https://spdx.org/rdf/3.0.1/terms/AI/EnergyConsumptionDescription", + "ai_EnergyUnitType": "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType", + "ai_SafetyRiskAssessmentType": "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType", + "ai_autonomyType": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/autonomyType", + "@type": "@vocab", + }, + "ai_domain": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/domain", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "ai_energyConsumption": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/energyConsumption", + "@type": "@vocab", + }, + "ai_energyQuantity": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/energyQuantity", + "@type": "http://www.w3.org/2001/XMLSchema#decimal", + }, + "ai_energyUnit": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/AI/EnergyUnitType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/energyUnit", + "@type": "@vocab", + }, + "ai_finetuningEnergyConsumption": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/finetuningEnergyConsumption", + "@type": "@vocab", + }, + "ai_hyperparameter": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/hyperparameter", + "@type": "@vocab", + }, + "ai_inferenceEnergyConsumption": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/inferenceEnergyConsumption", + "@type": "@vocab", + }, + "ai_informationAboutApplication": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/informationAboutApplication", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "ai_informationAboutTraining": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/informationAboutTraining", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "ai_limitation": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/limitation", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "ai_metric": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/metric", + "@type": "@vocab", + }, + "ai_metricDecisionThreshold": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/metricDecisionThreshold", + "@type": "@vocab", + }, + "ai_modelDataPreprocessing": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/modelDataPreprocessing", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "ai_modelExplainability": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/modelExplainability", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "ai_safetyRiskAssessment": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/AI/SafetyRiskAssessmentType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/safetyRiskAssessment", + "@type": "@vocab", + }, + "ai_standardCompliance": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/standardCompliance", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "ai_trainingEnergyConsumption": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/trainingEnergyConsumption", + "@type": "@vocab", + }, + "ai_typeOfModel": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/typeOfModel", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "ai_useSensitivePersonalInformation": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/AI/useSensitivePersonalInformation", + "@type": "@vocab", + }, + "algorithm": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/HashAlgorithm/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/algorithm", + "@type": "@vocab", + }, + "annotationType": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/AnnotationType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/annotationType", + "@type": "@vocab", + }, + "beginIntegerRange": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/beginIntegerRange", + "@type": "http://www.w3.org/2001/XMLSchema#positiveInteger", + }, + "build_Build": "https://spdx.org/rdf/3.0.1/terms/Build/Build", + "build_buildEndTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Build/buildEndTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "build_buildId": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Build/buildId", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "build_buildStartTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Build/buildStartTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "build_buildType": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Build/buildType", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "build_configSourceDigest": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Build/configSourceDigest", + "@type": "@vocab", + }, + "build_configSourceEntrypoint": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Build/configSourceEntrypoint", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "build_configSourceUri": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Build/configSourceUri", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "build_environment": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Build/environment", + "@type": "@vocab", + }, + "build_parameter": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Build/parameter", + "@type": "@vocab", + }, + "builtTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/builtTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "comment": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/comment", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "completeness": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipCompleteness/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/completeness", + "@type": "@vocab", + }, + "contentType": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/contentType", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "context": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/context", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "created": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/created", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "createdBy": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/createdBy", + "@type": "@vocab", + }, + "createdUsing": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/createdUsing", + "@type": "@vocab", + }, + "creationInfo": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/creationInfo", + "@type": "@vocab", + }, + "dataLicense": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/dataLicense", + "@type": "@vocab", + }, + "dataset_ConfidentialityLevelType": "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType", + "dataset_DatasetAvailabilityType": "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType", + "dataset_DatasetPackage": "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetPackage", + "dataset_DatasetType": "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType", + "dataset_anonymizationMethodUsed": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/anonymizationMethodUsed", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "dataset_confidentialityLevel": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Dataset/ConfidentialityLevelType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/confidentialityLevel", + "@type": "@vocab", + }, + "dataset_dataCollectionProcess": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/dataCollectionProcess", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "dataset_dataPreprocessing": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/dataPreprocessing", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "dataset_datasetAvailability": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetAvailabilityType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/datasetAvailability", + "@type": "@vocab", + }, + "dataset_datasetNoise": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/datasetNoise", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "dataset_datasetSize": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/datasetSize", + "@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger", + }, + "dataset_datasetType": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Dataset/DatasetType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/datasetType", + "@type": "@vocab", + }, + "dataset_datasetUpdateMechanism": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/datasetUpdateMechanism", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "dataset_hasSensitivePersonalInformation": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/PresenceType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/hasSensitivePersonalInformation", + "@type": "@vocab", + }, + "dataset_intendedUse": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/intendedUse", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "dataset_knownBias": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/knownBias", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "dataset_sensor": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Dataset/sensor", + "@type": "@vocab", + }, + "definingArtifact": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/definingArtifact", + "@type": "@vocab", + }, + "description": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/description", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "element": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/element", + "@type": "@vocab", + }, + "endIntegerRange": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/endIntegerRange", + "@type": "http://www.w3.org/2001/XMLSchema#positiveInteger", + }, + "endTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/endTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "expandedlicensing_ConjunctiveLicenseSet": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/ConjunctiveLicenseSet", + "expandedlicensing_CustomLicense": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/CustomLicense", + "expandedlicensing_CustomLicenseAddition": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/CustomLicenseAddition", + "expandedlicensing_DisjunctiveLicenseSet": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/DisjunctiveLicenseSet", + "expandedlicensing_ExtendableLicense": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/ExtendableLicense", + "expandedlicensing_IndividualLicensingInfo": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/IndividualLicensingInfo", + "expandedlicensing_License": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/License", + "expandedlicensing_LicenseAddition": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/LicenseAddition", + "expandedlicensing_ListedLicense": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/ListedLicense", + "expandedlicensing_ListedLicenseException": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/ListedLicenseException", + "expandedlicensing_NoAssertionLicense": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/NoAssertionLicense", + "expandedlicensing_NoneLicense": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/NoneLicense", + "expandedlicensing_OrLaterOperator": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/OrLaterOperator", + "expandedlicensing_WithAdditionOperator": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/WithAdditionOperator", + "expandedlicensing_additionText": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/additionText", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "expandedlicensing_deprecatedVersion": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/deprecatedVersion", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "expandedlicensing_isDeprecatedAdditionId": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isDeprecatedAdditionId", + "@type": "http://www.w3.org/2001/XMLSchema#boolean", + }, + "expandedlicensing_isDeprecatedLicenseId": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isDeprecatedLicenseId", + "@type": "http://www.w3.org/2001/XMLSchema#boolean", + }, + "expandedlicensing_isFsfLibre": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isFsfLibre", + "@type": "http://www.w3.org/2001/XMLSchema#boolean", + }, + "expandedlicensing_isOsiApproved": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/isOsiApproved", + "@type": "http://www.w3.org/2001/XMLSchema#boolean", + }, + "expandedlicensing_licenseXml": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/licenseXml", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "expandedlicensing_listVersionAdded": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/listVersionAdded", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "expandedlicensing_member": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/member", + "@type": "@vocab", + }, + "expandedlicensing_obsoletedBy": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/obsoletedBy", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "expandedlicensing_seeAlso": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/seeAlso", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "expandedlicensing_standardAdditionTemplate": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardAdditionTemplate", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "expandedlicensing_standardLicenseHeader": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardLicenseHeader", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "expandedlicensing_standardLicenseTemplate": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/standardLicenseTemplate", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "expandedlicensing_subjectAddition": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectAddition", + "@type": "@vocab", + }, + "expandedlicensing_subjectExtendableLicense": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectExtendableLicense", + "@type": "@vocab", + }, + "expandedlicensing_subjectLicense": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/ExpandedLicensing/subjectLicense", + "@type": "@vocab", + }, + "extension": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/extension", + "@type": "@vocab", + }, + "extension_CdxPropertiesExtension": "https://spdx.org/rdf/3.0.1/terms/Extension/CdxPropertiesExtension", + "extension_CdxPropertyEntry": "https://spdx.org/rdf/3.0.1/terms/Extension/CdxPropertyEntry", + "extension_Extension": "https://spdx.org/rdf/3.0.1/terms/Extension/Extension", + "extension_cdxPropName": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Extension/cdxPropName", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "extension_cdxPropValue": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Extension/cdxPropValue", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "extension_cdxProperty": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Extension/cdxProperty", + "@type": "@vocab", + }, + "externalIdentifier": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/externalIdentifier", + "@type": "@vocab", + }, + "externalIdentifierType": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/ExternalIdentifierType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/externalIdentifierType", + "@type": "@vocab", + }, + "externalRef": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/externalRef", + "@type": "@vocab", + }, + "externalRefType": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/ExternalRefType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/externalRefType", + "@type": "@vocab", + }, + "externalSpdxId": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/externalSpdxId", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "from": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/from", + "@type": "@vocab", + }, + "hashValue": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/hashValue", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "identifier": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/identifier", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "identifierLocator": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/identifierLocator", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "import": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/import", + "@type": "@vocab", + }, + "issuingAuthority": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/issuingAuthority", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "key": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/key", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "locationHint": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/locationHint", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "locator": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/locator", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "name": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/name", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "namespace": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/namespace", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "namespaceMap": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/namespaceMap", + "@type": "@vocab", + }, + "originatedBy": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/originatedBy", + "@type": "@vocab", + }, + "packageVerificationCodeExcludedFile": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/packageVerificationCodeExcludedFile", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "prefix": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/prefix", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "profileConformance": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/ProfileIdentifierType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/profileConformance", + "@type": "@vocab", + }, + "relationshipType": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/RelationshipType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/relationshipType", + "@type": "@vocab", + }, + "releaseTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/releaseTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "rootElement": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/rootElement", + "@type": "@vocab", + }, + "scope": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/LifecycleScopeType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/scope", + "@type": "@vocab", + }, + "security_CvssSeverityType": "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType", + "security_CvssV2VulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/CvssV2VulnAssessmentRelationship", + "security_CvssV3VulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/CvssV3VulnAssessmentRelationship", + "security_CvssV4VulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/CvssV4VulnAssessmentRelationship", + "security_EpssVulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/EpssVulnAssessmentRelationship", + "security_ExploitCatalogType": "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType", + "security_ExploitCatalogVulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogVulnAssessmentRelationship", + "security_SsvcDecisionType": "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType", + "security_SsvcVulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/SsvcVulnAssessmentRelationship", + "security_VexAffectedVulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/VexAffectedVulnAssessmentRelationship", + "security_VexFixedVulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/VexFixedVulnAssessmentRelationship", + "security_VexJustificationType": "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType", + "security_VexNotAffectedVulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/VexNotAffectedVulnAssessmentRelationship", + "security_VexUnderInvestigationVulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/VexUnderInvestigationVulnAssessmentRelationship", + "security_VexVulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/VexVulnAssessmentRelationship", + "security_VulnAssessmentRelationship": "https://spdx.org/rdf/3.0.1/terms/Security/VulnAssessmentRelationship", + "security_Vulnerability": "https://spdx.org/rdf/3.0.1/terms/Security/Vulnerability", + "security_actionStatement": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/actionStatement", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "security_actionStatementTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/actionStatementTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "security_assessedElement": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/assessedElement", + "@type": "@vocab", + }, + "security_catalogType": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Security/ExploitCatalogType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/catalogType", + "@type": "@vocab", + }, + "security_decisionType": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Security/SsvcDecisionType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/decisionType", + "@type": "@vocab", + }, + "security_exploited": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/exploited", + "@type": "http://www.w3.org/2001/XMLSchema#boolean", + }, + "security_impactStatement": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/impactStatement", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "security_impactStatementTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/impactStatementTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "security_justificationType": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Security/VexJustificationType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/justificationType", + "@type": "@vocab", + }, + "security_locator": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/locator", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "security_modifiedTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/modifiedTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "security_percentile": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/percentile", + "@type": "http://www.w3.org/2001/XMLSchema#decimal", + }, + "security_probability": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/probability", + "@type": "http://www.w3.org/2001/XMLSchema#decimal", + }, + "security_publishedTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/publishedTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "security_score": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/score", + "@type": "http://www.w3.org/2001/XMLSchema#decimal", + }, + "security_severity": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Security/CvssSeverityType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/severity", + "@type": "@vocab", + }, + "security_statusNotes": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/statusNotes", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "security_vectorString": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/vectorString", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "security_vexVersion": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/vexVersion", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "security_withdrawnTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Security/withdrawnTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "simplelicensing_AnyLicenseInfo": "https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/AnyLicenseInfo", + "simplelicensing_LicenseExpression": "https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/LicenseExpression", + "simplelicensing_SimpleLicensingText": "https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/SimpleLicensingText", + "simplelicensing_customIdToUri": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/customIdToUri", + "@type": "@vocab", + }, + "simplelicensing_licenseExpression": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseExpression", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "simplelicensing_licenseListVersion": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseListVersion", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "simplelicensing_licenseText": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/SimpleLicensing/licenseText", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "software_ContentIdentifier": "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifier", + "software_ContentIdentifierType": "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType", + "software_File": "https://spdx.org/rdf/3.0.1/terms/Software/File", + "software_FileKindType": "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType", + "software_Package": "https://spdx.org/rdf/3.0.1/terms/Software/Package", + "software_Sbom": "https://spdx.org/rdf/3.0.1/terms/Software/Sbom", + "software_SbomType": "https://spdx.org/rdf/3.0.1/terms/Software/SbomType", + "software_Snippet": "https://spdx.org/rdf/3.0.1/terms/Software/Snippet", + "software_SoftwareArtifact": "https://spdx.org/rdf/3.0.1/terms/Software/SoftwareArtifact", + "software_SoftwarePurpose": "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose", + "software_additionalPurpose": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/additionalPurpose", + "@type": "@vocab", + }, + "software_attributionText": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/attributionText", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "software_byteRange": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/byteRange", + "@type": "https://spdx.org/rdf/3.0.1/terms/Core/PositiveIntegerRange", + }, + "software_contentIdentifier": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifier", + "@type": "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifier", + }, + "software_contentIdentifierType": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Software/ContentIdentifierType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifierType", + "@type": "@vocab", + }, + "software_contentIdentifierValue": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/contentIdentifierValue", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "software_copyrightText": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/copyrightText", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "software_downloadLocation": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/downloadLocation", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "software_fileKind": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Software/FileKindType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/fileKind", + "@type": "@vocab", + }, + "software_homePage": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/homePage", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "software_lineRange": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/lineRange", + "@type": "https://spdx.org/rdf/3.0.1/terms/Core/PositiveIntegerRange", + }, + "software_packageUrl": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/packageUrl", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + "software_packageVersion": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/packageVersion", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "software_primaryPurpose": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Software/SoftwarePurpose/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/primaryPurpose", + "@type": "@vocab", + }, + "software_sbomType": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Software/SbomType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/sbomType", + "@type": "@vocab", + }, + "software_snippetFromFile": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/snippetFromFile", + "@type": "@vocab", + }, + "software_sourceInfo": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Software/sourceInfo", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "spdx": "https://spdx.org/rdf/3.0.1/terms/", + "spdxId": "@id", + "specVersion": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/specVersion", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "standardName": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/standardName", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "startTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/startTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "statement": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/statement", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "subject": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/subject", + "@type": "@vocab", + }, + "summary": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/summary", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "suppliedBy": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/suppliedBy", + "@type": "@vocab", + }, + "supportLevel": map[string]any{ + "@context": map[string]any{"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/SupportType/"}, + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/supportLevel", + "@type": "@vocab", + }, + "to": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/to", + "@type": "@vocab", + }, + "type": "@type", + "validUntilTime": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/validUntilTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTimeStamp", + }, + "value": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/value", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + "verifiedUsing": map[string]any{ + "@id": "https://spdx.org/rdf/3.0.1/terms/Core/verifiedUsing", + "@type": "@vocab", + }, + }}, + NewExternalIRI, + AIPackage{}, + Agent{}, + Annotation{}, + AnnotationType{}, + AnnotationType_Other, + AnnotationType_Review, + Artifact{}, + Bom{}, + Build{}, + Bundle{}, + CdxPropertiesExtension{}, + CdxPropertyEntry{}, + ConfidentialityLevelType{}, + ConfidentialityLevelType_Amber, + ConfidentialityLevelType_Clear, + ConfidentialityLevelType_Green, + ConfidentialityLevelType_Red, + ConjunctiveLicenseSet{}, + ContentIdentifier{}, + ContentIdentifierType{}, + ContentIdentifierType_Gitoid, + ContentIdentifierType_Swhid, + CreationInfo{}, + CustomLicense{}, + CustomLicenseAddition{}, + CvssSeverityType{}, + CvssSeverityType_Critical, + CvssSeverityType_High, + CvssSeverityType_Low, + CvssSeverityType_Medium, + CvssSeverityType_None, + CvssV2VulnAssessmentRelationship{}, + CvssV3VulnAssessmentRelationship{}, + CvssV4VulnAssessmentRelationship{}, + DatasetAvailabilityType{}, + DatasetAvailabilityType_Clickthrough, + DatasetAvailabilityType_DirectDownload, + DatasetAvailabilityType_Query, + DatasetAvailabilityType_Registration, + DatasetAvailabilityType_ScrapingScript, + DatasetPackage{}, + DatasetType{}, + DatasetType_Audio, + DatasetType_Categorical, + DatasetType_Graph, + DatasetType_Image, + DatasetType_NoAssertion, + DatasetType_Numeric, + DatasetType_Other, + DatasetType_Sensor, + DatasetType_Structured, + DatasetType_Syntactic, + DatasetType_Text, + DatasetType_Timeseries, + DatasetType_Timestamp, + DatasetType_Video, + DictionaryEntry{}, + DisjunctiveLicenseSet{}, + Element{}, + ElementCollection{}, + EnergyConsumption{}, + EnergyConsumptionDescription{}, + EnergyUnitType{}, + EnergyUnitType_KilowattHour, + EnergyUnitType_Megajoule, + EnergyUnitType_Other, + EpssVulnAssessmentRelationship{}, + ExploitCatalogType{}, + ExploitCatalogType_Kev, + ExploitCatalogType_Other, + ExploitCatalogVulnAssessmentRelationship{}, + ExtendableLicense{}, + Extension{}, + ExternalIdentifier{}, + ExternalIdentifierType{}, + ExternalIdentifierType_Cpe22, + ExternalIdentifierType_Cpe23, + ExternalIdentifierType_Cve, + ExternalIdentifierType_Email, + ExternalIdentifierType_Gitoid, + ExternalIdentifierType_Other, + ExternalIdentifierType_PackageUrl, + ExternalIdentifierType_SecurityOther, + ExternalIdentifierType_Swhid, + ExternalIdentifierType_Swid, + ExternalIdentifierType_UrlScheme, + ExternalMap{}, + ExternalRef{}, + ExternalRefType{}, + ExternalRefType_AltDownloadLocation, + ExternalRefType_AltWebPage, + ExternalRefType_BinaryArtifact, + ExternalRefType_Bower, + ExternalRefType_BuildMeta, + ExternalRefType_BuildSystem, + ExternalRefType_CertificationReport, + ExternalRefType_Chat, + ExternalRefType_ComponentAnalysisReport, + ExternalRefType_Cwe, + ExternalRefType_Documentation, + ExternalRefType_DynamicAnalysisReport, + ExternalRefType_EolNotice, + ExternalRefType_ExportControlAssessment, + ExternalRefType_Funding, + ExternalRefType_IssueTracker, + ExternalRefType_License, + ExternalRefType_MailingList, + ExternalRefType_MavenCentral, + ExternalRefType_Metrics, + ExternalRefType_Npm, + ExternalRefType_Nuget, + ExternalRefType_Other, + ExternalRefType_PrivacyAssessment, + ExternalRefType_ProductMetadata, + ExternalRefType_PurchaseOrder, + ExternalRefType_QualityAssessmentReport, + ExternalRefType_ReleaseHistory, + ExternalRefType_ReleaseNotes, + ExternalRefType_RiskAssessment, + ExternalRefType_RuntimeAnalysisReport, + ExternalRefType_SecureSoftwareAttestation, + ExternalRefType_SecurityAdversaryModel, + ExternalRefType_SecurityAdvisory, + ExternalRefType_SecurityFix, + ExternalRefType_SecurityOther, + ExternalRefType_SecurityPenTestReport, + ExternalRefType_SecurityPolicy, + ExternalRefType_SecurityThreatModel, + ExternalRefType_SocialMedia, + ExternalRefType_SourceArtifact, + ExternalRefType_StaticAnalysisReport, + ExternalRefType_Support, + ExternalRefType_Vcs, + ExternalRefType_VulnerabilityDisclosureReport, + ExternalRefType_VulnerabilityExploitabilityAssessment, + File{}, + FileKindType{}, + FileKindType_Directory, + FileKindType_File, + Hash{}, + HashAlgorithm{}, + HashAlgorithm_Adler32, + HashAlgorithm_Blake2b256, + HashAlgorithm_Blake2b384, + HashAlgorithm_Blake2b512, + HashAlgorithm_Blake3, + HashAlgorithm_CrystalsDilithium, + HashAlgorithm_CrystalsKyber, + HashAlgorithm_Falcon, + HashAlgorithm_Md2, + HashAlgorithm_Md4, + HashAlgorithm_Md5, + HashAlgorithm_Md6, + HashAlgorithm_Other, + HashAlgorithm_Sha1, + HashAlgorithm_Sha224, + HashAlgorithm_Sha256, + HashAlgorithm_Sha384, + HashAlgorithm_Sha3_224, + HashAlgorithm_Sha3_256, + HashAlgorithm_Sha3_384, + HashAlgorithm_Sha3_512, + HashAlgorithm_Sha512, + IndividualElement{}, + IndividualElement_NoAssertionElement, + IndividualElement_NoneElement, + IndividualLicensingInfo{}, + IndividualLicensingInfo_NoAssertionLicense, + IndividualLicensingInfo_NoneLicense, + IntegrityMethod{}, + License{}, + LicenseAddition{}, + LicenseExpression{}, + LicenseInfo{}, + LifecycleScopeType{}, + LifecycleScopeType_Build, + LifecycleScopeType_Design, + LifecycleScopeType_Development, + LifecycleScopeType_Other, + LifecycleScopeType_Runtime, + LifecycleScopeType_Test, + LifecycleScopedRelationship{}, + ListedLicense{}, + ListedLicenseException{}, + NamespaceMap{}, + OrLaterOperator{}, + Organization{}, + Organization_SpdxOrganization, + Package{}, + PackageVerificationCode{}, + Person{}, + PositiveIntegerRange{}, + PresenceType{}, + PresenceType_No, + PresenceType_NoAssertion, + PresenceType_Yes, + ProfileIdentifierType{}, + ProfileIdentifierType_Ai, + ProfileIdentifierType_Build, + ProfileIdentifierType_Core, + ProfileIdentifierType_Dataset, + ProfileIdentifierType_ExpandedLicensing, + ProfileIdentifierType_Extension, + ProfileIdentifierType_Lite, + ProfileIdentifierType_Security, + ProfileIdentifierType_SimpleLicensing, + ProfileIdentifierType_Software, + Relationship{}, + RelationshipCompleteness{}, + RelationshipCompleteness_Complete, + RelationshipCompleteness_Incomplete, + RelationshipCompleteness_NoAssertion, + RelationshipType{}, + RelationshipType_Affects, + RelationshipType_AmendedBy, + RelationshipType_AncestorOf, + RelationshipType_AvailableFrom, + RelationshipType_Configures, + RelationshipType_Contains, + RelationshipType_CoordinatedBy, + RelationshipType_CopiedTo, + RelationshipType_DelegatedTo, + RelationshipType_DependsOn, + RelationshipType_DescendantOf, + RelationshipType_Describes, + RelationshipType_DoesNotAffect, + RelationshipType_ExpandsTo, + RelationshipType_ExploitCreatedBy, + RelationshipType_FixedBy, + RelationshipType_FixedIn, + RelationshipType_FoundBy, + RelationshipType_Generates, + RelationshipType_HasAddedFile, + RelationshipType_HasAssessmentFor, + RelationshipType_HasAssociatedVulnerability, + RelationshipType_HasConcludedLicense, + RelationshipType_HasDataFile, + RelationshipType_HasDeclaredLicense, + RelationshipType_HasDeletedFile, + RelationshipType_HasDependencyManifest, + RelationshipType_HasDistributionArtifact, + RelationshipType_HasDocumentation, + RelationshipType_HasDynamicLink, + RelationshipType_HasEvidence, + RelationshipType_HasExample, + RelationshipType_HasHost, + RelationshipType_HasInput, + RelationshipType_HasMetadata, + RelationshipType_HasOptionalComponent, + RelationshipType_HasOptionalDependency, + RelationshipType_HasOutput, + RelationshipType_HasPrerequisite, + RelationshipType_HasProvidedDependency, + RelationshipType_HasRequirement, + RelationshipType_HasSpecification, + RelationshipType_HasStaticLink, + RelationshipType_HasTest, + RelationshipType_HasTestCase, + RelationshipType_HasVariant, + RelationshipType_InvokedBy, + RelationshipType_ModifiedBy, + RelationshipType_Other, + RelationshipType_PackagedBy, + RelationshipType_PatchedBy, + RelationshipType_PublishedBy, + RelationshipType_ReportedBy, + RelationshipType_RepublishedBy, + RelationshipType_SerializedInArtifact, + RelationshipType_TestedOn, + RelationshipType_TrainedOn, + RelationshipType_UnderInvestigationFor, + RelationshipType_UsesTool, + SafetyRiskAssessmentType{}, + SafetyRiskAssessmentType_High, + SafetyRiskAssessmentType_Low, + SafetyRiskAssessmentType_Medium, + SafetyRiskAssessmentType_Serious, + Sbom{}, + SbomType{}, + SbomType_Analyzed, + SbomType_Build, + SbomType_Deployed, + SbomType_Design, + SbomType_Runtime, + SbomType_Source, + SimpleLicensingText{}, + Snippet{}, + SoftwareAgent{}, + SoftwareArtifact{}, + SoftwarePurpose{}, + SoftwarePurpose_Application, + SoftwarePurpose_Archive, + SoftwarePurpose_Bom, + SoftwarePurpose_Configuration, + SoftwarePurpose_Container, + SoftwarePurpose_Data, + SoftwarePurpose_Device, + SoftwarePurpose_DeviceDriver, + SoftwarePurpose_DiskImage, + SoftwarePurpose_Documentation, + SoftwarePurpose_Evidence, + SoftwarePurpose_Executable, + SoftwarePurpose_File, + SoftwarePurpose_FilesystemImage, + SoftwarePurpose_Firmware, + SoftwarePurpose_Framework, + SoftwarePurpose_Install, + SoftwarePurpose_Library, + SoftwarePurpose_Manifest, + SoftwarePurpose_Model, + SoftwarePurpose_Module, + SoftwarePurpose_OperatingSystem, + SoftwarePurpose_Other, + SoftwarePurpose_Patch, + SoftwarePurpose_Platform, + SoftwarePurpose_Requirement, + SoftwarePurpose_Source, + SoftwarePurpose_Specification, + SoftwarePurpose_Test, + SpdxDocument{}, + SsvcDecisionType{}, + SsvcDecisionType_Act, + SsvcDecisionType_Attend, + SsvcDecisionType_Track, + SsvcDecisionType_TrackStar, + SsvcVulnAssessmentRelationship{}, + SupportType{}, + SupportType_Deployed, + SupportType_Development, + SupportType_EndOfSupport, + SupportType_LimitedSupport, + SupportType_NoAssertion, + SupportType_NoSupport, + SupportType_Support, + Tool{}, + VexAffectedVulnAssessmentRelationship{}, + VexFixedVulnAssessmentRelationship{}, + VexJustificationType{}, + VexJustificationType_ComponentNotPresent, + VexJustificationType_InlineMitigationsAlreadyExist, + VexJustificationType_VulnerableCodeCannotBeControlledByAdversary, + VexJustificationType_VulnerableCodeNotInExecutePath, + VexJustificationType_VulnerableCodeNotPresent, + VexNotAffectedVulnAssessmentRelationship{}, + VexUnderInvestigationVulnAssessmentRelationship{}, + VexVulnAssessmentRelationship{}, + VulnAssessmentRelationship{}, + Vulnerability{}, + WithAdditionOperator{}, + ) +} diff --git a/spdx/v3/v3_0/model_validations.go b/spdx/v3/v3_0/model_validations.go new file mode 100755 index 00000000..abd2da7c --- /dev/null +++ b/spdx/v3/v3_0/model_validations.go @@ -0,0 +1,878 @@ +// Generated by github.com/kzantow/go-ld +// +// SPDX-License-Identifier: MIT + +package v3_0 + +import "github.com/kzantow/go-ld" + +func (o *AIPackage) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Package), + ld.ValidateProperty(o, &o.UseSensitivePersonalInformation, + ld.ValidateIRI( + PresenceType_Yes, + PresenceType_No, + PresenceType_NoAssertion, + )), + ld.ValidateProperty(o, &o.AutonomyType, + ld.ValidateIRI( + PresenceType_Yes, + PresenceType_No, + PresenceType_NoAssertion, + )), + ld.ValidateProperty(o, &o.SafetyRiskAssessment, + ld.ValidateIRI( + SafetyRiskAssessmentType_Serious, + SafetyRiskAssessmentType_High, + SafetyRiskAssessmentType_Medium, + SafetyRiskAssessmentType_Low, + ))) +} + +func (o *Agent) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Element)) +} + +func (o *Annotation) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Element), + ld.ValidateProperty(o, &o.Subject), + ld.ValidateProperty(o, &o.ContentType, + ld.ValidateExpression("^[^\\/]+\\/[^\\/]+$")), + ld.ValidateProperty(o, &o.AnnotationType, + ld.ValidateIRI( + AnnotationType_Other, + AnnotationType_Review, + ))) +} + +func (o *AnnotationType) Validate() error { + return ld.JoinErrors() +} + +func (o *Artifact) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Element), + ld.ValidateProperty(o, &o.SupportLevels, + ld.ValidateAll(ld.ValidateIRI( + SupportType_Development, + SupportType_Support, + SupportType_Deployed, + SupportType_LimitedSupport, + SupportType_EndOfSupport, + SupportType_NoSupport, + SupportType_NoAssertion, + )))) +} + +func (o *Bom) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Bundle)) +} + +func (o *Build) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Element), + ld.ValidateProperty(o, &o.BuildType)) +} + +func (o *Bundle) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.ElementCollection)) +} + +func (o *CdxPropertiesExtension) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Extension), + ld.ValidateProperty(o, &o.CdxProperties, + ld.ValidateMinCount[CdxPropertyEntryList](1))) +} + +func (o *CdxPropertyEntry) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.CdxPropName)) +} + +func (o *ConfidentialityLevelType) Validate() error { + return ld.JoinErrors() +} + +func (o *ConjunctiveLicenseSet) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.LicenseInfo), + ld.ValidateProperty(o, &o.Members, + ld.ValidateMinCount[LicenseInfoList](2))) +} + +func (o *ContentIdentifier) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.IntegrityMethod), + ld.ValidateProperty(o, &o.ContentIdentifierType, + ld.ValidateIRI( + ContentIdentifierType_Gitoid, + ContentIdentifierType_Swhid, + )), + ld.ValidateProperty(o, &o.ContentIdentifierValue)) +} + +func (o *ContentIdentifierType) Validate() error { + return ld.JoinErrors() +} + +func (o *CreationInfo) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.SpecVersion, + ld.ValidateExpression("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$")), + ld.ValidateProperty(o, &o.Created), + ld.ValidateProperty(o, &o.CreatedBy, + ld.ValidateMinCount[AgentList](1))) +} + +func (o *CustomLicense) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.License)) +} + +func (o *CustomLicenseAddition) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.LicenseAddition)) +} + +func (o *CvssSeverityType) Validate() error { + return ld.JoinErrors() +} + +func (o *CvssV2VulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.VulnAssessmentRelationship), + ld.ValidateProperty(o, &o.VectorString), + ld.ValidateProperty(o, &o.Score)) +} + +func (o *CvssV3VulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.VulnAssessmentRelationship), + ld.ValidateProperty(o, &o.Score), + ld.ValidateProperty(o, &o.Severity, + ld.ValidateIRI( + CvssSeverityType_Critical, + CvssSeverityType_High, + CvssSeverityType_Medium, + CvssSeverityType_Low, + CvssSeverityType_None, + )), + ld.ValidateProperty(o, &o.VectorString)) +} + +func (o *CvssV4VulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.VulnAssessmentRelationship), + ld.ValidateProperty(o, &o.Severity, + ld.ValidateIRI( + CvssSeverityType_Critical, + CvssSeverityType_High, + CvssSeverityType_Medium, + CvssSeverityType_Low, + CvssSeverityType_None, + )), + ld.ValidateProperty(o, &o.VectorString), + ld.ValidateProperty(o, &o.Score)) +} + +func (o *DatasetAvailabilityType) Validate() error { + return ld.JoinErrors() +} + +func (o *DatasetPackage) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Package), + ld.ValidateProperty(o, &o.ConfidentialityLevel, + ld.ValidateIRI( + ConfidentialityLevelType_Red, + ConfidentialityLevelType_Amber, + ConfidentialityLevelType_Green, + ConfidentialityLevelType_Clear, + )), + ld.ValidateProperty(o, &o.DatasetAvailability, + ld.ValidateIRI( + DatasetAvailabilityType_Clickthrough, + DatasetAvailabilityType_DirectDownload, + DatasetAvailabilityType_Query, + DatasetAvailabilityType_Registration, + DatasetAvailabilityType_ScrapingScript, + )), + ld.ValidateProperty(o, &o.HasSensitivePersonalInformation, + ld.ValidateIRI( + PresenceType_Yes, + PresenceType_No, + PresenceType_NoAssertion, + )), + ld.ValidateProperty(o, &o.DatasetTypes, + ld.ValidateMinCount[[]DatasetType](1), + ld.ValidateAll(ld.ValidateIRI( + DatasetType_Audio, + DatasetType_Categorical, + DatasetType_Graph, + DatasetType_Image, + DatasetType_NoAssertion, + DatasetType_Numeric, + DatasetType_Other, + DatasetType_Sensor, + DatasetType_Structured, + DatasetType_Syntactic, + DatasetType_Text, + DatasetType_Timeseries, + DatasetType_Timestamp, + DatasetType_Video, + )))) +} + +func (o *DatasetType) Validate() error { + return ld.JoinErrors() +} + +func (o *DictionaryEntry) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Key)) +} + +func (o *DisjunctiveLicenseSet) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.LicenseInfo), + ld.ValidateProperty(o, &o.Members, + ld.ValidateMinCount[LicenseInfoList](2))) +} + +func (o *Element) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.CreationInfo)) +} + +func (o *ElementCollection) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Element), + ld.ValidateProperty(o, &o.ProfileConformances, + ld.ValidateAll(ld.ValidateIRI( + ProfileIdentifierType_Core, + ProfileIdentifierType_Software, + ProfileIdentifierType_SimpleLicensing, + ProfileIdentifierType_ExpandedLicensing, + ProfileIdentifierType_Security, + ProfileIdentifierType_Build, + ProfileIdentifierType_Ai, + ProfileIdentifierType_Dataset, + ProfileIdentifierType_Extension, + ProfileIdentifierType_Lite, + )))) +} + +func (o *EnergyConsumption) Validate() error { + return ld.JoinErrors() +} + +func (o *EnergyConsumptionDescription) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.EnergyQuantity), + ld.ValidateProperty(o, &o.EnergyUnit, + ld.ValidateIRI( + EnergyUnitType_KilowattHour, + EnergyUnitType_Megajoule, + EnergyUnitType_Other, + ))) +} + +func (o *EnergyUnitType) Validate() error { + return ld.JoinErrors() +} + +func (o *EpssVulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.VulnAssessmentRelationship), + ld.ValidateProperty(o, &o.Probability), + ld.ValidateProperty(o, &o.Percentile)) +} + +func (o *ExploitCatalogType) Validate() error { + return ld.JoinErrors() +} + +func (o *ExploitCatalogVulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.VulnAssessmentRelationship), + ld.ValidateProperty(o, &o.Locator), + ld.ValidateProperty(o, &o.Exploited), + ld.ValidateProperty(o, &o.CatalogType, + ld.ValidateIRI( + ExploitCatalogType_Kev, + ExploitCatalogType_Other, + ))) +} + +func (o *ExtendableLicense) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.LicenseInfo)) +} + +func (o *Extension) Validate() error { + return ld.JoinErrors() +} + +func (o *ExternalIdentifier) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Identifier), + ld.ValidateProperty(o, &o.ExternalIdentifierType, + ld.ValidateIRI( + ExternalIdentifierType_Cpe22, + ExternalIdentifierType_Cpe23, + ExternalIdentifierType_Cve, + ExternalIdentifierType_Email, + ExternalIdentifierType_Gitoid, + ExternalIdentifierType_Other, + ExternalIdentifierType_PackageUrl, + ExternalIdentifierType_SecurityOther, + ExternalIdentifierType_Swhid, + ExternalIdentifierType_Swid, + ExternalIdentifierType_UrlScheme, + ))) +} + +func (o *ExternalIdentifierType) Validate() error { + return ld.JoinErrors() +} + +func (o *ExternalMap) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.ExternalSpdxId)) +} + +func (o *ExternalRef) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.ContentType, + ld.ValidateExpression("^[^\\/]+\\/[^\\/]+$")), + ld.ValidateProperty(o, &o.ExternalRefType, + ld.ValidateIRI( + ExternalRefType_AltDownloadLocation, + ExternalRefType_AltWebPage, + ExternalRefType_BinaryArtifact, + ExternalRefType_Bower, + ExternalRefType_BuildMeta, + ExternalRefType_BuildSystem, + ExternalRefType_Chat, + ExternalRefType_CertificationReport, + ExternalRefType_ComponentAnalysisReport, + ExternalRefType_Cwe, + ExternalRefType_Documentation, + ExternalRefType_DynamicAnalysisReport, + ExternalRefType_EolNotice, + ExternalRefType_ExportControlAssessment, + ExternalRefType_Funding, + ExternalRefType_IssueTracker, + ExternalRefType_MailingList, + ExternalRefType_MavenCentral, + ExternalRefType_Metrics, + ExternalRefType_Npm, + ExternalRefType_Nuget, + ExternalRefType_License, + ExternalRefType_Other, + ExternalRefType_PrivacyAssessment, + ExternalRefType_ProductMetadata, + ExternalRefType_PurchaseOrder, + ExternalRefType_QualityAssessmentReport, + ExternalRefType_ReleaseNotes, + ExternalRefType_ReleaseHistory, + ExternalRefType_RiskAssessment, + ExternalRefType_RuntimeAnalysisReport, + ExternalRefType_SecureSoftwareAttestation, + ExternalRefType_SecurityAdvisory, + ExternalRefType_SecurityAdversaryModel, + ExternalRefType_SecurityFix, + ExternalRefType_SecurityOther, + ExternalRefType_SecurityPenTestReport, + ExternalRefType_SecurityPolicy, + ExternalRefType_SecurityThreatModel, + ExternalRefType_SocialMedia, + ExternalRefType_SourceArtifact, + ExternalRefType_StaticAnalysisReport, + ExternalRefType_Support, + ExternalRefType_Vcs, + ExternalRefType_VulnerabilityDisclosureReport, + ExternalRefType_VulnerabilityExploitabilityAssessment, + ))) +} + +func (o *ExternalRefType) Validate() error { + return ld.JoinErrors() +} + +func (o *File) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.SoftwareArtifact), + ld.ValidateProperty(o, &o.ContentType, + ld.ValidateExpression("^[^\\/]+\\/[^\\/]+$")), + ld.ValidateProperty(o, &o.FileKind, + ld.ValidateIRI( + FileKindType_File, + FileKindType_Directory, + ))) +} + +func (o *FileKindType) Validate() error { + return ld.JoinErrors() +} + +func (o *Hash) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.IntegrityMethod), + ld.ValidateProperty(o, &o.HashValue), + ld.ValidateProperty(o, &o.Algorithm, + ld.ValidateIRI( + HashAlgorithm_Adler32, + HashAlgorithm_Blake2b256, + HashAlgorithm_Blake2b384, + HashAlgorithm_Blake2b512, + HashAlgorithm_Blake3, + HashAlgorithm_CrystalsDilithium, + HashAlgorithm_CrystalsKyber, + HashAlgorithm_Falcon, + HashAlgorithm_Md2, + HashAlgorithm_Md4, + HashAlgorithm_Md5, + HashAlgorithm_Md6, + HashAlgorithm_Other, + HashAlgorithm_Sha1, + HashAlgorithm_Sha224, + HashAlgorithm_Sha256, + HashAlgorithm_Sha384, + HashAlgorithm_Sha512, + HashAlgorithm_Sha3_224, + HashAlgorithm_Sha3_256, + HashAlgorithm_Sha3_384, + HashAlgorithm_Sha3_512, + ))) +} + +func (o *HashAlgorithm) Validate() error { + return ld.JoinErrors() +} + +func (o *IndividualElement) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Element)) +} + +func (o *IndividualLicensingInfo) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.LicenseInfo)) +} + +func (o *IntegrityMethod) Validate() error { + return ld.JoinErrors() +} + +func (o *License) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.ExtendableLicense), + ld.ValidateProperty(o, &o.LicenseText)) +} + +func (o *LicenseAddition) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Element), + ld.ValidateProperty(o, &o.AdditionText)) +} + +func (o *LicenseExpression) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.LicenseInfo), + ld.ValidateProperty(o, &o.LicenseExpression), + ld.ValidateProperty(o, &o.LicenseListVersion, + ld.ValidateExpression("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"))) +} + +func (o *LicenseInfo) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Element)) +} + +func (o *LifecycleScopeType) Validate() error { + return ld.JoinErrors() +} + +func (o *LifecycleScopedRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Relationship), + ld.ValidateProperty(o, &o.Scope, + ld.ValidateIRI( + LifecycleScopeType_Design, + LifecycleScopeType_Development, + LifecycleScopeType_Build, + LifecycleScopeType_Test, + LifecycleScopeType_Runtime, + LifecycleScopeType_Other, + ))) +} + +func (o *ListedLicense) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.License)) +} + +func (o *ListedLicenseException) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.LicenseAddition)) +} + +func (o *NamespaceMap) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Namespace), + ld.ValidateProperty(o, &o.Prefix)) +} + +func (o *OrLaterOperator) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.ExtendableLicense), + ld.ValidateProperty(o, &o.SubjectLicense)) +} + +func (o *Organization) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Agent)) +} + +func (o *Package) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.SoftwareArtifact)) +} + +func (o *PackageVerificationCode) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.IntegrityMethod), + ld.ValidateProperty(o, &o.Algorithm, + ld.ValidateIRI( + HashAlgorithm_Adler32, + HashAlgorithm_Blake2b256, + HashAlgorithm_Blake2b384, + HashAlgorithm_Blake2b512, + HashAlgorithm_Blake3, + HashAlgorithm_CrystalsDilithium, + HashAlgorithm_CrystalsKyber, + HashAlgorithm_Falcon, + HashAlgorithm_Md2, + HashAlgorithm_Md4, + HashAlgorithm_Md5, + HashAlgorithm_Md6, + HashAlgorithm_Other, + HashAlgorithm_Sha1, + HashAlgorithm_Sha224, + HashAlgorithm_Sha256, + HashAlgorithm_Sha384, + HashAlgorithm_Sha512, + HashAlgorithm_Sha3_224, + HashAlgorithm_Sha3_256, + HashAlgorithm_Sha3_384, + HashAlgorithm_Sha3_512, + )), + ld.ValidateProperty(o, &o.HashValue)) +} + +func (o *Person) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Agent)) +} + +func (o *PositiveIntegerRange) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.EndIntegerRange), + ld.ValidateProperty(o, &o.BeginIntegerRange)) +} + +func (o *PresenceType) Validate() error { + return ld.JoinErrors() +} + +func (o *ProfileIdentifierType) Validate() error { + return ld.JoinErrors() +} + +func (o *Relationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Element), + ld.ValidateProperty(o, &o.Completeness, + ld.ValidateIRI( + RelationshipCompleteness_Incomplete, + RelationshipCompleteness_Complete, + RelationshipCompleteness_NoAssertion, + )), + ld.ValidateProperty(o, &o.To, + ld.ValidateMinCount[ElementList](1)), + ld.ValidateProperty(o, &o.From), + ld.ValidateProperty(o, &o.RelationshipType, + ld.ValidateIRI( + RelationshipType_Affects, + RelationshipType_AmendedBy, + RelationshipType_AncestorOf, + RelationshipType_AvailableFrom, + RelationshipType_Configures, + RelationshipType_Contains, + RelationshipType_CoordinatedBy, + RelationshipType_CopiedTo, + RelationshipType_DelegatedTo, + RelationshipType_DependsOn, + RelationshipType_DescendantOf, + RelationshipType_Describes, + RelationshipType_DoesNotAffect, + RelationshipType_ExpandsTo, + RelationshipType_ExploitCreatedBy, + RelationshipType_FixedBy, + RelationshipType_FixedIn, + RelationshipType_FoundBy, + RelationshipType_Generates, + RelationshipType_HasAddedFile, + RelationshipType_HasAssessmentFor, + RelationshipType_HasAssociatedVulnerability, + RelationshipType_HasConcludedLicense, + RelationshipType_HasDataFile, + RelationshipType_HasDeclaredLicense, + RelationshipType_HasDeletedFile, + RelationshipType_HasDependencyManifest, + RelationshipType_HasDistributionArtifact, + RelationshipType_HasDocumentation, + RelationshipType_HasDynamicLink, + RelationshipType_HasEvidence, + RelationshipType_HasExample, + RelationshipType_HasHost, + RelationshipType_HasInput, + RelationshipType_HasMetadata, + RelationshipType_HasOptionalComponent, + RelationshipType_HasOptionalDependency, + RelationshipType_HasOutput, + RelationshipType_HasPrerequisite, + RelationshipType_HasProvidedDependency, + RelationshipType_HasRequirement, + RelationshipType_HasSpecification, + RelationshipType_HasStaticLink, + RelationshipType_HasTest, + RelationshipType_HasTestCase, + RelationshipType_HasVariant, + RelationshipType_InvokedBy, + RelationshipType_ModifiedBy, + RelationshipType_Other, + RelationshipType_PackagedBy, + RelationshipType_PatchedBy, + RelationshipType_PublishedBy, + RelationshipType_ReportedBy, + RelationshipType_RepublishedBy, + RelationshipType_SerializedInArtifact, + RelationshipType_TestedOn, + RelationshipType_TrainedOn, + RelationshipType_UnderInvestigationFor, + RelationshipType_UsesTool, + ))) +} + +func (o *RelationshipCompleteness) Validate() error { + return ld.JoinErrors() +} + +func (o *RelationshipType) Validate() error { + return ld.JoinErrors() +} + +func (o *SafetyRiskAssessmentType) Validate() error { + return ld.JoinErrors() +} + +func (o *Sbom) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Bom), + ld.ValidateProperty(o, &o.SbomTypes, + ld.ValidateAll(ld.ValidateIRI( + SbomType_Design, + SbomType_Source, + SbomType_Build, + SbomType_Deployed, + SbomType_Runtime, + SbomType_Analyzed, + )))) +} + +func (o *SbomType) Validate() error { + return ld.JoinErrors() +} + +func (o *SimpleLicensingText) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Element), + ld.ValidateProperty(o, &o.LicenseText)) +} + +func (o *Snippet) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.SoftwareArtifact), + ld.ValidateProperty(o, &o.SnippetFromFile)) +} + +func (o *SoftwareAgent) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Agent)) +} + +func (o *SoftwareArtifact) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Artifact), + ld.ValidateProperty(o, &o.AdditionalPurposes, + ld.ValidateAll(ld.ValidateIRI( + SoftwarePurpose_Application, + SoftwarePurpose_Archive, + SoftwarePurpose_Bom, + SoftwarePurpose_Configuration, + SoftwarePurpose_Container, + SoftwarePurpose_Data, + SoftwarePurpose_Device, + SoftwarePurpose_DiskImage, + SoftwarePurpose_DeviceDriver, + SoftwarePurpose_Documentation, + SoftwarePurpose_Evidence, + SoftwarePurpose_Executable, + SoftwarePurpose_File, + SoftwarePurpose_FilesystemImage, + SoftwarePurpose_Firmware, + SoftwarePurpose_Framework, + SoftwarePurpose_Install, + SoftwarePurpose_Library, + SoftwarePurpose_Manifest, + SoftwarePurpose_Model, + SoftwarePurpose_Module, + SoftwarePurpose_OperatingSystem, + SoftwarePurpose_Other, + SoftwarePurpose_Patch, + SoftwarePurpose_Platform, + SoftwarePurpose_Requirement, + SoftwarePurpose_Source, + SoftwarePurpose_Specification, + SoftwarePurpose_Test, + ))), + ld.ValidateProperty(o, &o.PrimaryPurpose, + ld.ValidateIRI( + SoftwarePurpose_Application, + SoftwarePurpose_Archive, + SoftwarePurpose_Bom, + SoftwarePurpose_Configuration, + SoftwarePurpose_Container, + SoftwarePurpose_Data, + SoftwarePurpose_Device, + SoftwarePurpose_DiskImage, + SoftwarePurpose_DeviceDriver, + SoftwarePurpose_Documentation, + SoftwarePurpose_Evidence, + SoftwarePurpose_Executable, + SoftwarePurpose_File, + SoftwarePurpose_FilesystemImage, + SoftwarePurpose_Firmware, + SoftwarePurpose_Framework, + SoftwarePurpose_Install, + SoftwarePurpose_Library, + SoftwarePurpose_Manifest, + SoftwarePurpose_Model, + SoftwarePurpose_Module, + SoftwarePurpose_OperatingSystem, + SoftwarePurpose_Other, + SoftwarePurpose_Patch, + SoftwarePurpose_Platform, + SoftwarePurpose_Requirement, + SoftwarePurpose_Source, + SoftwarePurpose_Specification, + SoftwarePurpose_Test, + ))) +} + +func (o *SoftwarePurpose) Validate() error { + return ld.JoinErrors() +} + +func (o *SpdxDocument) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.ElementCollection)) +} + +func (o *SsvcDecisionType) Validate() error { + return ld.JoinErrors() +} + +func (o *SsvcVulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.VulnAssessmentRelationship), + ld.ValidateProperty(o, &o.DecisionType, + ld.ValidateIRI( + SsvcDecisionType_Act, + SsvcDecisionType_Attend, + SsvcDecisionType_Track, + SsvcDecisionType_TrackStar, + ))) +} + +func (o *SupportType) Validate() error { + return ld.JoinErrors() +} + +func (o *Tool) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Element)) +} + +func (o *VexAffectedVulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.VexVulnAssessmentRelationship), + ld.ValidateProperty(o, &o.ActionStatement)) +} + +func (o *VexFixedVulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.VexVulnAssessmentRelationship)) +} + +func (o *VexJustificationType) Validate() error { + return ld.JoinErrors() +} + +func (o *VexNotAffectedVulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.VexVulnAssessmentRelationship), + ld.ValidateProperty(o, &o.JustificationType, + ld.ValidateIRI( + VexJustificationType_ComponentNotPresent, + VexJustificationType_VulnerableCodeNotPresent, + VexJustificationType_VulnerableCodeCannotBeControlledByAdversary, + VexJustificationType_VulnerableCodeNotInExecutePath, + VexJustificationType_InlineMitigationsAlreadyExist, + ))) +} + +func (o *VexUnderInvestigationVulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.VexVulnAssessmentRelationship)) +} + +func (o *VexVulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.VulnAssessmentRelationship)) +} + +func (o *VulnAssessmentRelationship) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Relationship)) +} + +func (o *Vulnerability) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.Artifact)) +} + +func (o *WithAdditionOperator) Validate() error { + return ld.JoinErrors( + ld.ValidateProperty(o, &o.LicenseInfo), + ld.ValidateProperty(o, &o.SubjectExtendableLicense), + ld.ValidateProperty(o, &o.SubjectAddition)) +} diff --git a/spdx/v3/v3_0/spdx.go b/spdx/v3/v3_0/spdx.go index 93fb6741..bd00b7f4 100644 --- a/spdx/v3/v3_0/spdx.go +++ b/spdx/v3/v3_0/spdx.go @@ -1,8 +1,13 @@ package v3_0 import ( + "fmt" + "io" "reflect" "time" + + "github.com/davecgh/go-spew/spew" + "github.com/kzantow/go-ld" ) /* @@ -17,13 +22,19 @@ To regenerate, use something like this command: type Document struct { *SpdxDocument + LDContext ld.Context +} + +func LDContext() ld.Context { + return context() } -func NewDocument(conformance profileIdentifierType, name string, createdBy AnyAgent, createdUsing AnyTool) *Document { +func NewDocument(conformance ProfileIdentifierType, name string, createdBy AnyAgent, createdUsing AnyTool) *Document { ci := &CreationInfo{ - Created: time.Now(), - CreatedBys: AgentList{createdBy}, - CreatedUsings: ToolList{createdUsing}, + SpecVersion: "3.0.1", // TODO is there a way to ascertain this version from generated code programmatically? + Created: time.Now(), + CreatedBy: AgentList{createdBy}, + CreatedUsing: ToolList{createdUsing}, } return &Document{ SpdxDocument: &SpdxDocument{ @@ -32,95 +43,91 @@ func NewDocument(conformance profileIdentifierType, name string, createdBy AnyAg Name: name, CreationInfo: ci, }, - ProfileConformances: []profileIdentifierType{conformance}, + ProfileConformances: []ProfileIdentifierType{conformance}, }, }, - //LDContext: LDContext(), + LDContext: context(), + } +} + +func (d *Document) Validate(setCreationInfo bool) error { + if setCreationInfo { + // all Elements need to have creationInfo set... + d.setCreationInfo(d.SpdxDocument.CreationInfo, d.SpdxDocument) } + return ld.ValidateGraph(d.SpdxDocument) } func (d *Document) Append(e ...AnyElement) { d.SpdxDocument.RootElements = append(d.SpdxDocument.RootElements, e...) - d.SpdxDocument.Elements = append(d.SpdxDocument.Elements, e...) } -func (d *Document) setCreationInfo(creationInfo AnyCreationInfo, doc *SpdxDocument) { - iCreationInfoType := reflect.TypeOf((*AnyCreationInfo)(nil)).Elem() - ci := reflect.ValueOf(creationInfo) - _ = visitObjectGraph(map[reflect.Value]struct{}{}, reflect.ValueOf(doc), func(v reflect.Value) error { - if v.IsZero() { - return nil - } - t := v.Type() - if t.Kind() == reflect.Interface && v.IsNil() && t.Implements(iCreationInfoType) { - v.Set(ci) - } - return nil - }) +// ToJSON first processes the document by: +// - setting each Element's CreationInfo property to the SpdxDocument's CreationInfo if nil +// - collecting all element references to the top-level Elements slice +// +// ... and after this initial processing, outputs the document as compact JSON LD, +// including accounting for empty IDs by outputting blank node spdxId values +func (d *Document) ToJSON(writer io.Writer) error { + if d.SpdxDocument == nil { + return fmt.Errorf("no document object created") + } + + // all Elements need to have creationInfo set... + d.setCreationInfo(d.SpdxDocument.CreationInfo, d.SpdxDocument) + + // ensure the Elements + d.ensureAllDocumentElements() + + return d.LDContext.ToJSON(writer, d.SpdxDocument) } -func (d *Document) ensureSpdxIDs(doc *SpdxDocument, idGen idGenerator) { - iElementType := reflect.TypeOf((*AnyElement)(nil)).Elem() - _ = visitObjectGraph(map[reflect.Value]struct{}{}, reflect.ValueOf(doc), func(v reflect.Value) error { - if v.Type().Implements(iElementType) { - el, ok := v.Interface().(AnyElement) - if ok { - e := el.asElement() - if e != nil && e.ID == "" { - e.ID = idGen(el) - } - } +func (d *Document) setCreationInfo(creationInfo AnyCreationInfo, doc *SpdxDocument) { + creationInfoInterfaceType := reflect.TypeOf((*AnyCreationInfo)(nil)).Elem() + ci := reflect.ValueOf(creationInfo) + _ = ld.VisitObjectGraph(doc, func(path []any, value reflect.Value) error { + t := value.Type() + if t == creationInfoInterfaceType && value.IsNil() { + value.Set(ci) } return nil }) } -type idGenerator func(e any) string - -func baseType(t reflect.Type) reflect.Type { - for t.Kind() == reflect.Ptr { - t = t.Elem() - } - return t -} - -func visitObjectGraph(visited map[reflect.Value]struct{}, v reflect.Value, visitor func(reflect.Value) error) error { - if _, ok := visited[v]; ok { - return nil - } - visited[v] = struct{}{} - if !v.IsValid() { - return nil - } - err := visitor(v) +func (d *Document) FromJSON(reader io.Reader) error { + graph, err := d.LDContext.FromJSON(reader) if err != nil { return err } - switch v.Kind() { - case reflect.Interface: - if !v.IsNil() { - return visitObjectGraph(visited, v.Elem(), visitor) - } - case reflect.Pointer: - if v.IsNil() { + for _, e := range graph { + if doc, ok := e.(*SpdxDocument); ok { + d.SpdxDocument = doc return nil } - return visitObjectGraph(visited, v.Elem(), visitor) - case reflect.Struct: - for i := 0; i < v.NumField(); i++ { - err = visitObjectGraph(visited, v.Field(i), visitor) - if err != nil { - return err - } + } + return fmt.Errorf("no SPDX document found") +} + +func (d *Document) ensureAllDocumentElements() { + all := map[reflect.Value]struct{}{} + for _, e := range d.Elements { + v := reflect.ValueOf(e) + if v.Kind() != reflect.Pointer { + panic("non-pointer type in elements: %v" + spew.Sdump(v)) } - case reflect.Slice: - for i := 0; i < v.Len(); i++ { - err = visitObjectGraph(visited, v.Index(i), visitor) - if err != nil { - return err + all[v] = struct{}{} + } + all[reflect.ValueOf(d.SpdxDocument)] = struct{}{} + _ = ld.VisitObjectGraph(d.SpdxDocument, func(path []any, value reflect.Value) error { + if value.Kind() == reflect.Pointer { + if _, ok := all[value]; ok { + return nil + } + if e, ok := value.Interface().(AnyElement); ok { + all[value] = struct{}{} + d.Elements = append(d.Elements, e) } } - default: - } - return nil + return nil + }) } diff --git a/spdx/v3/v3_0/spdx_test.go b/spdx/v3/v3_0/spdx_test.go index 0f9e70c1..9be0eeb7 100644 --- a/spdx/v3/v3_0/spdx_test.go +++ b/spdx/v3/v3_0/spdx_test.go @@ -1,11 +1,217 @@ package v3_0_test import ( + "bytes" + "fmt" + "os" + "reflect" + "strings" "testing" + "time" + + "github.com/google/go-cmp/cmp" + "github.com/kzantow/go-ld" + "github.com/pmezard/go-difflib/difflib" + "github.com/stretchr/testify/require" spdx "github.com/spdx/tools-golang/spdx/v3/v3_0" ) +func Test_validateMinList(t *testing.T) { + a := &spdx.Person{} + a.Name = "me" + e := &spdx.CreationInfo{ + SpecVersion: "3.0.1", + Created: time.Now(), + CreatedUsing: nil, + Comment: "", + CreatedBy: spdx.AgentList{}, + } + err := e.Validate() + require.Error(t, err) + require.Contains(t, err.Error(), "must have") +} + +func Test_writer(t *testing.T) { + d := newTestDocument() + pkg1 := &spdx.Package{SoftwareArtifact: spdx.SoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ + Name: "the pkg 2", + }}}} + file1 := &spdx.File{ + SoftwareArtifact: spdx.SoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ + Name: "a file", + }}}, + ContentType: "text", // validation error + FileKind: spdx.FileKindType{}, + } + d.Append( + &spdx.Sbom{Bom: spdx.Bom{Bundle: spdx.Bundle{ElementCollection: spdx.ElementCollection{ + Element: spdx.Element{ + Name: "My Bom", + }, + Elements: spdx.ElementList{}, + }}}, + SbomTypes: nil, + }, + file1, + pkg1, + &spdx.Package{ + SoftwareArtifact: spdx.SoftwareArtifact{ + Artifact: spdx.Artifact{ + Element: spdx.Element{ + ID: "some ID!", + Name: "some name", + Description: "descr", + ExternalIdentifiers: spdx.ExternalIdentifierList{ + &spdx.ExternalIdentifier{ + IdentifierLocators: []ld.URI{ + "locator1", + "locator2", + }, + Identifier: "CVE-2024-1234", + ExternalIdentifierType: spdx.ExternalIdentifierType_Cve, + }, + }, + ExternalRefs: nil, + Summary: "", + VerifiedUsings: nil, + }, + StandardNames: []string{ + "standard-name1", + "standard-name2", + }, + ReleaseTime: time.Now(), + }, + AdditionalPurposes: []spdx.SoftwarePurpose{ + spdx.SoftwarePurpose_Container, + spdx.SoftwarePurpose_Library, + }, + PrimaryPurpose: spdx.SoftwarePurpose_Application, + CopyrightText: "", + }, + }, + ) + + // many validation issues + err := d.Validate(false) + require.Error(t, err) + require.Contains(t, err.Error(), "CreationInfo") + + err = d.Validate(true) + require.Error(t, err) + require.NotContains(t, err.Error(), "CreationInfo") + + // fix validation issue + file1.ContentType = "text/plain" + err = d.Validate(false) // already use creationInfo + require.NoError(t, err) + + buf := bytes.Buffer{} + err = d.ToJSON(&buf) + require.NoError(t, err) + fmt.Printf("%#v\n", buf.String()) + + d2 := newTestDocument() + err = d2.FromJSON(&buf) + require.NoError(t, err) + // these would (correctly) cause a failure, to validate unexported and time fields are being properly checked: + //d2.RootElements.Packages().Views()[1].PrimaryPurpose = spdx.SoftwarePurpose_Archive + //_ = spdx.As(d2.CreationInfo, func(info *spdx.CreationInfo) error { + // info.Created = info.Created.Add(time.Hour) + // return nil + //}) + diff := cmp.Diff(d.SpdxDocument, d2.SpdxDocument, testOpts...) + if diff != "" { + t.Fatal(diff) + } +} + +var testOpts = []cmp.Option{ + cmp.Transformer("truncate_time.Time", func(t time.Time) time.Time { + return t.Truncate(time.Second) + }), + // export and compare unexported fields + cmp.Exporter(func(r reflect.Type) bool { + return true + }), +} + +func Test_reader(t *testing.T) { + f, err := os.Open("test.json") + require.NoError(t, err) + d := newTestDocument() + err = d.FromJSON(f) + require.NoError(t, err) + fmt.Printf("%#v\n", d) + + require.Equal(t, d.Elements.Files().Len(), 1) + for _, fi := range d.Elements.Files() { + if fi.PrimaryPurpose == spdx.SoftwarePurpose_Executable { + println("Got Executable File ID: " + fi.ID) + } + } + + // the example is incorrect, it doesn't include the package in the element root + pkgs := d.Elements.Packages().Views() + //require.Len(t, pkgs, 1) + //require.NotEqual(t, time.Time{}, pkgs[0].BuiltTime) + require.Empty(t, pkgs) // FIXME this shouldn't be true, but the example is wrong + + rels := d.Elements.Relationships().Views() + require.Len(t, rels, 1) + + if p, ok := rels[0].From.(*spdx.Package); ok { + require.NotEqual(t, time.Time{}, p.BuiltTime) + } + // this is the only reference to the package I see: + _ = spdx.As(rels[0].From, func(p *spdx.Package) error { + require.NotEqual(t, time.Time{}, p.BuiltTime) + return nil + }) +} + +func Test_readerExpanded(t *testing.T) { + f, err := os.Open("test.expanded.json") + require.NoError(t, err) + d := newTestDocument() + err = d.FromJSON(f) + require.NoError(t, err) + fmt.Printf("%#v\n", d) + for _, fi := range d.Elements.Files() { + println("File ID: " + fi.ID) + } + + pkgs := d.Elements.Packages().Views() + require.Len(t, pkgs, 1) + require.NotEqual(t, time.Time{}, pkgs[0].BuiltTime) +} + +func Test_reader2(t *testing.T) { + contents := ` + { + "@context": "https://spdx.org/rdf/3.0.1/spdx-context.jsonld", + "@graph": [ + { "spdxId": "https://spdx.org/rdf/3.0.1/terms/Core/SpdxOrganization" }, + { "spdxId": "SpdxOrganization" }, +{ + "type": "CreationInfo", + "@id": "_:creationinfo", + "createdBy": [ + "http://spdx.example.com/Agent/JoshuaWatt" + ], + "specVersion": "3.0.1", + "created": "2024-03-06T00:00:00Z" + } + ] +} + ` + graph, err := spdx.LDContext().FromJSON(strings.NewReader(contents)) + require.NoError(t, err) + for _, fi := range graph { + println("Elem" + fmt.Sprintf("%#v", fi)) + } +} + func Test_exportImportExport(t *testing.T) { // create a document doc := spdx.NewDocument( @@ -26,23 +232,23 @@ func Test_exportImportExport(t *testing.T) { Name: "not-tools-golang", }}) - sbom := &spdx.SoftwareSbom{} + sbom := &spdx.Sbom{} doc.RootElements = append(doc.RootElements, sbom) // create a package - pkg1 := &spdx.SoftwarePackage{ - SoftwareSoftwareArtifact: spdx.SoftwareSoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ + pkg1 := &spdx.Package{ + SoftwareArtifact: spdx.SoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ Name: "some-package-1", }}}, - SoftwarePackageVersion: "1.2.3", + PackageVersion: "1.2.3", } // create another package - pkg2 := &spdx.AiAIPackage{} + pkg2 := &spdx.AIPackage{} pkg2.Name = "some-package-2" - pkg2.SoftwarePackageVersion = "2.4.5" + pkg2.PackageVersion = "2.4.5" // add the packages to the sbom @@ -50,7 +256,7 @@ func Test_exportImportExport(t *testing.T) { // add a file - file1 := &spdx.SoftwareFile{SoftwareSoftwareArtifact: spdx.SoftwareSoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ + file1 := &spdx.File{SoftwareArtifact: spdx.SoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ Name: "/bin/bash", }}}} sbom.RootElements = append(sbom.RootElements, file1) @@ -60,7 +266,7 @@ func Test_exportImportExport(t *testing.T) { sbom.RootElements = append(sbom.RootElements, &spdx.Relationship{ From: file1, RelationshipType: spdx.RelationshipType_Contains, - Tos: spdx.ElementList{ + To: spdx.ElementList{ pkg1, pkg2, }, @@ -69,22 +275,65 @@ func Test_exportImportExport(t *testing.T) { sbom.RootElements = append(sbom.RootElements, &spdx.Relationship{ From: pkg1, RelationshipType: spdx.RelationshipType_DependsOn, - Tos: spdx.ElementList{ + To: spdx.ElementList{ pkg2, }, }) + // serialize + + buf := bytes.Buffer{} + err := doc.ToJSON(&buf) + if err != nil { + t.Error(err) + } + + json1 := buf.String() + fmt.Printf("--------- initial JSON: ----------\n%s\n\n", json1) + + // deserialize to a new document + + newDoc := newTestDocument() + err = newDoc.FromJSON(strings.NewReader(json1)) + if err != nil { + t.Error(err) + } + + // re-serialize + + buf.Reset() + err = newDoc.ToJSON(&buf) + if err != nil { + t.Error(err) + } + json2 := buf.String() + fmt.Printf("--------- reserialized JSON: ----------\n%s\n", json2) + + // compare original to parsed and re-encoded + + diff := difflib.UnifiedDiff{ + A: difflib.SplitLines(json1), + B: difflib.SplitLines(json2), + FromFile: "Original", + ToFile: "Current", + Context: 3, + } + text, _ := difflib.GetUnifiedDiffString(diff) + if text != "" { + t.Errorf(text) + } + // some basic usage: - var pkgs []*spdx.SoftwarePackage - for _, sbom := range doc.RootElements.SoftwareSbomIter() { - for _, rel := range sbom.RootElements.RelationshipIter() { + var pkgs []*spdx.Package + for _, sbom := range doc.RootElements.Sboms() { + for _, rel := range sbom.RootElements.Relationships() { if rel.RelationshipType != spdx.RelationshipType_Contains { continue } - _ = spdx.As(rel.From, func(f *spdx.SoftwareFile) any { + _ = spdx.As(rel.From, func(f *spdx.File) any { if f.Name == "/bin/bash" { - for _, pkg := range rel.Tos.SoftwarePackageIter() { + for _, pkg := range rel.To.Packages() { pkgs = append(pkgs, pkg) } } @@ -98,8 +347,85 @@ func Test_exportImportExport(t *testing.T) { } } +func Test_aiProfile(t *testing.T) { + doc := spdx.NewDocument(spdx.ProfileIdentifierType_Ai, "", &spdx.SoftwareAgent{Agent: spdx.Agent{Element: spdx.Element{ + Name: "tools-golang", + Summary: "a summary", + }}}, nil) + + aiPkg := &spdx.AIPackage{ + Package: spdx.Package{SoftwareArtifact: spdx.SoftwareArtifact{Artifact: spdx.Artifact{Element: spdx.Element{ + Name: "some ai package", + }}}}, + EnergyConsumption: &spdx.EnergyConsumption{ + FinetuningEnergyConsumptions: spdx.EnergyConsumptionDescriptionList{ + &spdx.EnergyConsumptionDescription{ + EnergyQuantity: 1.2, + EnergyUnit: spdx.EnergyUnitType_KilowattHour, + }, + }, + TrainingEnergyConsumptions: spdx.EnergyConsumptionDescriptionList{ + &spdx.EnergyConsumptionDescription{ + EnergyQuantity: 5032402, + EnergyUnit: spdx.EnergyUnitType_KilowattHour, + }, + }, + }, + TypeOfModels: []string{ + "Llama 3 8B", + }, + } + + doc.RootElements = append(doc.RootElements, aiPkg) + + // serialize + + buf := bytes.Buffer{} + err := doc.ToJSON(&buf) + if err != nil { + t.Error(err) + } + + json1 := buf.String() + fmt.Printf("--------- initial JSON: ----------\n%s\n\n", json1) + + // deserialize to a new document + + doc = newTestDocument() + //doc.RootElements.Append(&spdx.Agent{}) + err = doc.FromJSON(strings.NewReader(json1)) + if err != nil { + t.Error(err) + } + + // re-serialize + + buf.Reset() + err = doc.ToJSON(&buf) + if err != nil { + t.Error(err) + } + json2 := buf.String() + fmt.Printf("--------- reserialized JSON: ----------\n%s\n", json2) + + // compare original to parsed and re-encoded + + diff := difflib.UnifiedDiff{ + A: difflib.SplitLines(json1), + B: difflib.SplitLines(json2), + FromFile: "Original", + ToFile: "Current", + Context: 3, + } + text, _ := difflib.GetUnifiedDiffString(diff) + if text != "" { + t.Errorf(text) + } +} + func newTestDocument() *spdx.Document { - return spdx.NewDocument(spdx.ProfileIdentifierType_Lite, "test document", + //return spdx.NewDocument(spdx.ProfileIdentifierType_Lite, "test document", + return spdx.NewDocument(spdx.ProfileIdentifierType_Software, "test document", &spdx.SoftwareAgent{Agent: spdx.Agent{Element: spdx.Element{Name: "tools-golang-tests-agent", Summary: "a summary"}}}, &spdx.Tool{Element: spdx.Element{Name: "tools-golang-tests-tool"}}) } diff --git a/spdx/v3/v3_0/util.go b/spdx/v3/v3_0/util.go deleted file mode 100644 index 2b75336f..00000000 --- a/spdx/v3/v3_0/util.go +++ /dev/null @@ -1,38 +0,0 @@ -// This file was automatically generated by __main__.py. DO NOT MANUALLY MODIFY IT -// -// SPDX-License-Identifier: 0BSD - -package v3_0 - -import ( - "iter" -) - -func typeIter[T any, E any](values []E, cast func(any) *T) iter.Seq2[E, *T] { - if values == nil { - return func(yield func(E, *T) bool) {} - } - return func(yield func(E, *T) bool) { - for _, value := range values { - v := cast(value) - if v != nil { - if !yield(value, v) { - return - } - } - } - } -} - -func remove[T comparable, E ~[]T](slice *E, value T) { - if slice == nil { - return - } - s := *slice - for i := 0; i < len(*slice); i++ { - if s[i] == value { - *slice = append(s[0:i], s[:i+1]...) - i-- - } - } -} diff --git a/spdx/v3/v3_0/validator.go b/spdx/v3/v3_0/validator.go deleted file mode 100644 index 05ea49ed..00000000 --- a/spdx/v3/v3_0/validator.go +++ /dev/null @@ -1,1846 +0,0 @@ -// This file was automatically generated by __main__.py. DO NOT MANUALLY MODIFY IT -// -// SPDX-License-Identifier: 0BSD - -package v3_0 - -import ( - "fmt" - "slices" - "strconv" - "strings" -) - -type ValidationError struct { - Path []string - Err error -} - -func (v ValidationError) String() string { - return strings.Join(v.Path, ".") + ": " + v.Err.Error() -} - -func (v ValidationError) Error() string { - return v.String() -} - -func newValidationError(path []string, err error) ValidationError { - return ValidationError{ - Path: path, - Err: err, - } -} - -type validator interface { - Validate(visited map[any]struct{}, path ...string) []ValidationError -} - -func validateInValues(path []string, value string, valid ...string) []ValidationError { - if slices.Contains(valid, value) { - return nil - } - return []ValidationError{newValidationError(path, fmt.Errorf("invalid value: '%v', expected: %v", value, valid))} -} - -func (o *AiEnergyConsumption) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - for i, v := range o.AiFinetuningEnergyConsumptions { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "AiFinetuningEnergyConsumptions", strconv.Itoa(i))...)...) - } - } - - for i, v := range o.AiInferenceEnergyConsumptions { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "AiInferenceEnergyConsumptions", strconv.Itoa(i))...)...) - } - } - - for i, v := range o.AiTrainingEnergyConsumptions { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "AiTrainingEnergyConsumptions", strconv.Itoa(i))...)...) - } - } - - return errs -} - -func (o *AiEnergyConsumptionDescription) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - // TODO: check for required - - if o.AiEnergyUnit.ID == "" { - errs = append(errs, newValidationError(append(path, "AiEnergyUnit"), fmt.Errorf("required"))) - } - errs = append(errs, o.AiEnergyUnit.Validate(visited, append(path, "AiEnergyUnit")...)...) - - return errs -} - -func (o *AiEnergyUnitType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, AiEnergyUnitType_KilowattHour.ID, AiEnergyUnitType_Megajoule.ID, AiEnergyUnitType_Other.ID)...) - - return errs -} - -func (o *AiSafetyRiskAssessmentType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, AiSafetyRiskAssessmentType_High.ID, AiSafetyRiskAssessmentType_Low.ID, AiSafetyRiskAssessmentType_Medium.ID, AiSafetyRiskAssessmentType_Serious.ID)...) - - return errs -} - -func (o *AnnotationType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, AnnotationType_Other.ID, AnnotationType_Review.ID)...) - - return errs -} - -func (o *CreationInfo) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - // TODO: check for required - - // TODO: check for required - - for i, v := range o.CreatedBys { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "CreatedBys", strconv.Itoa(i))...)...) - } - } - - for i, v := range o.CreatedUsings { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "CreatedUsings", strconv.Itoa(i))...)...) - } - } - - // TODO: check for required - return errs -} - -func (o *DictionaryEntry) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *Element) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - // TODO: check for required - - if v, ok := o.CreationInfo.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "CreationInfo")...)...) - } - - // TODO: check for required - - for i, v := range o.Extensions { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "Extensions", strconv.Itoa(i))...)...) - } - } - - for i, v := range o.ExternalIdentifiers { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "ExternalIdentifiers", strconv.Itoa(i))...)...) - } - } - - for i, v := range o.ExternalRefs { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "ExternalRefs", strconv.Itoa(i))...)...) - } - } - - // TODO: check for required - - // TODO: check for required - - for i, v := range o.VerifiedUsings { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "VerifiedUsings", strconv.Itoa(i))...)...) - } - } - - return errs -} - -func (o *ElementCollection) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Element.Validate(visited, path...)...) - - for i, v := range o.Elements { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "Elements", strconv.Itoa(i))...)...) - } - } - - for _, v := range o.ProfileConformances { - errs = append(errs, v.Validate(visited, append(path, "ProfileConformances")...)...) - } - - for i, v := range o.RootElements { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "RootElements", strconv.Itoa(i))...)...) - } - } - - return errs -} - -func (o *ExternalIdentifier) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - // TODO: check for required - - if o.ExternalIdentifierType.ID == "" { - errs = append(errs, newValidationError(append(path, "ExternalIdentifierType"), fmt.Errorf("required"))) - } - errs = append(errs, o.ExternalIdentifierType.Validate(visited, append(path, "ExternalIdentifierType")...)...) - - // TODO: check for required - - // TODO: check for required/min/max/etc. - - // TODO: check for required - return errs -} - -func (o *ExternalIdentifierType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, ExternalIdentifierType_Cpe22.ID, ExternalIdentifierType_Cpe23.ID, ExternalIdentifierType_Cve.ID, ExternalIdentifierType_Email.ID, ExternalIdentifierType_Gitoid.ID, ExternalIdentifierType_Other.ID, ExternalIdentifierType_PackageUrl.ID, ExternalIdentifierType_SecurityOther.ID, ExternalIdentifierType_Swhid.ID, ExternalIdentifierType_Swid.ID, ExternalIdentifierType_UrlScheme.ID)...) - - return errs -} - -func (o *ExternalMap) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - if v, ok := o.DefiningArtifact.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "DefiningArtifact")...)...) - } - - // TODO: check for required - - // TODO: check for required - - for i, v := range o.VerifiedUsings { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "VerifiedUsings", strconv.Itoa(i))...)...) - } - } - - return errs -} - -func (o *ExternalRef) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - // TODO: check for required - - // TODO: check for required - - errs = append(errs, o.ExternalRefType.Validate(visited, append(path, "ExternalRefType")...)...) - - // TODO: check for required/min/max/etc. - - return errs -} - -func (o *ExternalRefType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, ExternalRefType_AltDownloadLocation.ID, ExternalRefType_AltWebPage.ID, ExternalRefType_BinaryArtifact.ID, ExternalRefType_Bower.ID, ExternalRefType_BuildMeta.ID, ExternalRefType_BuildSystem.ID, ExternalRefType_CertificationReport.ID, ExternalRefType_Chat.ID, ExternalRefType_ComponentAnalysisReport.ID, ExternalRefType_Cwe.ID, ExternalRefType_Documentation.ID, ExternalRefType_DynamicAnalysisReport.ID, ExternalRefType_EolNotice.ID, ExternalRefType_ExportControlAssessment.ID, ExternalRefType_Funding.ID, ExternalRefType_IssueTracker.ID, ExternalRefType_License.ID, ExternalRefType_MailingList.ID, ExternalRefType_MavenCentral.ID, ExternalRefType_Metrics.ID, ExternalRefType_Npm.ID, ExternalRefType_Nuget.ID, ExternalRefType_Other.ID, ExternalRefType_PrivacyAssessment.ID, ExternalRefType_ProductMetadata.ID, ExternalRefType_PurchaseOrder.ID, ExternalRefType_QualityAssessmentReport.ID, ExternalRefType_ReleaseHistory.ID, ExternalRefType_ReleaseNotes.ID, ExternalRefType_RiskAssessment.ID, ExternalRefType_RuntimeAnalysisReport.ID, ExternalRefType_SecureSoftwareAttestation.ID, ExternalRefType_SecurityAdversaryModel.ID, ExternalRefType_SecurityAdvisory.ID, ExternalRefType_SecurityFix.ID, ExternalRefType_SecurityOther.ID, ExternalRefType_SecurityPenTestReport.ID, ExternalRefType_SecurityPolicy.ID, ExternalRefType_SecurityThreatModel.ID, ExternalRefType_SocialMedia.ID, ExternalRefType_SourceArtifact.ID, ExternalRefType_StaticAnalysisReport.ID, ExternalRefType_Support.ID, ExternalRefType_Vcs.ID, ExternalRefType_VulnerabilityDisclosureReport.ID, ExternalRefType_VulnerabilityExploitabilityAssessment.ID)...) - - return errs -} - -func (o *HashAlgorithm) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, HashAlgorithm_Adler32.ID, HashAlgorithm_Blake2b256.ID, HashAlgorithm_Blake2b384.ID, HashAlgorithm_Blake2b512.ID, HashAlgorithm_Blake3.ID, HashAlgorithm_CrystalsDilithium.ID, HashAlgorithm_CrystalsKyber.ID, HashAlgorithm_Falcon.ID, HashAlgorithm_Md2.ID, HashAlgorithm_Md4.ID, HashAlgorithm_Md5.ID, HashAlgorithm_Md6.ID, HashAlgorithm_Other.ID, HashAlgorithm_Sha1.ID, HashAlgorithm_Sha224.ID, HashAlgorithm_Sha256.ID, HashAlgorithm_Sha384.ID, HashAlgorithm_Sha3224.ID, HashAlgorithm_Sha3256.ID, HashAlgorithm_Sha3384.ID, HashAlgorithm_Sha3512.ID, HashAlgorithm_Sha512.ID)...) - - return errs -} - -func (o *IndividualElement) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Element.Validate(visited, path...)...) - - errs = append(errs, validateInValues(path, o.ID, IndividualElement_NoAssertionElement.ID, IndividualElement_NoneElement.ID)...) - - return errs -} - -func (o *IntegrityMethod) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - // TODO: check for required - return errs -} - -func (o *LifecycleScopeType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, LifecycleScopeType_Build.ID, LifecycleScopeType_Design.ID, LifecycleScopeType_Development.ID, LifecycleScopeType_Other.ID, LifecycleScopeType_Runtime.ID, LifecycleScopeType_Test.ID)...) - - return errs -} - -func (o *NamespaceMap) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *PackageVerificationCode) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.IntegrityMethod.Validate(visited, path...)...) - - if o.Algorithm.ID == "" { - errs = append(errs, newValidationError(append(path, "Algorithm"), fmt.Errorf("required"))) - } - errs = append(errs, o.Algorithm.Validate(visited, append(path, "Algorithm")...)...) - - // TODO: check for required - - // TODO: check for required/min/max/etc. - - return errs -} - -func (o *PositiveIntegerRange) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *PresenceType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, PresenceType_No.ID, PresenceType_NoAssertion.ID, PresenceType_Yes.ID)...) - - return errs -} - -func (o *ProfileIdentifierType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, ProfileIdentifierType_Ai.ID, ProfileIdentifierType_Build.ID, ProfileIdentifierType_Core.ID, ProfileIdentifierType_Dataset.ID, ProfileIdentifierType_ExpandedLicensing.ID, ProfileIdentifierType_Extension.ID, ProfileIdentifierType_Lite.ID, ProfileIdentifierType_Security.ID, ProfileIdentifierType_SimpleLicensing.ID, ProfileIdentifierType_Software.ID)...) - - return errs -} - -func (o *Relationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Element.Validate(visited, path...)...) - - errs = append(errs, o.Completeness.Validate(visited, append(path, "Completeness")...)...) - - // TODO: check for required - - if v, ok := o.From.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "From")...)...) - } - - if o.RelationshipType.ID == "" { - errs = append(errs, newValidationError(append(path, "RelationshipType"), fmt.Errorf("required"))) - } - errs = append(errs, o.RelationshipType.Validate(visited, append(path, "RelationshipType")...)...) - - // TODO: check for required - - for i, v := range o.Tos { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "Tos", strconv.Itoa(i))...)...) - } - } - - return errs -} - -func (o *RelationshipCompleteness) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, RelationshipCompleteness_Complete.ID, RelationshipCompleteness_Incomplete.ID, RelationshipCompleteness_NoAssertion.ID)...) - - return errs -} - -func (o *RelationshipType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, RelationshipType_Affects.ID, RelationshipType_AmendedBy.ID, RelationshipType_AncestorOf.ID, RelationshipType_AvailableFrom.ID, RelationshipType_Configures.ID, RelationshipType_Contains.ID, RelationshipType_CoordinatedBy.ID, RelationshipType_CopiedTo.ID, RelationshipType_DelegatedTo.ID, RelationshipType_DependsOn.ID, RelationshipType_DescendantOf.ID, RelationshipType_Describes.ID, RelationshipType_DoesNotAffect.ID, RelationshipType_ExpandsTo.ID, RelationshipType_ExploitCreatedBy.ID, RelationshipType_FixedBy.ID, RelationshipType_FixedIn.ID, RelationshipType_FoundBy.ID, RelationshipType_Generates.ID, RelationshipType_HasAddedFile.ID, RelationshipType_HasAssessmentFor.ID, RelationshipType_HasAssociatedVulnerability.ID, RelationshipType_HasConcludedLicense.ID, RelationshipType_HasDataFile.ID, RelationshipType_HasDeclaredLicense.ID, RelationshipType_HasDeletedFile.ID, RelationshipType_HasDependencyManifest.ID, RelationshipType_HasDistributionArtifact.ID, RelationshipType_HasDocumentation.ID, RelationshipType_HasDynamicLink.ID, RelationshipType_HasEvidence.ID, RelationshipType_HasExample.ID, RelationshipType_HasHost.ID, RelationshipType_HasInput.ID, RelationshipType_HasMetadata.ID, RelationshipType_HasOptionalComponent.ID, RelationshipType_HasOptionalDependency.ID, RelationshipType_HasOutput.ID, RelationshipType_HasPrerequisite.ID, RelationshipType_HasProvidedDependency.ID, RelationshipType_HasRequirement.ID, RelationshipType_HasSpecification.ID, RelationshipType_HasStaticLink.ID, RelationshipType_HasTest.ID, RelationshipType_HasTestCase.ID, RelationshipType_HasVariant.ID, RelationshipType_InvokedBy.ID, RelationshipType_ModifiedBy.ID, RelationshipType_Other.ID, RelationshipType_PackagedBy.ID, RelationshipType_PatchedBy.ID, RelationshipType_PublishedBy.ID, RelationshipType_ReportedBy.ID, RelationshipType_RepublishedBy.ID, RelationshipType_SerializedInArtifact.ID, RelationshipType_TestedOn.ID, RelationshipType_TrainedOn.ID, RelationshipType_UnderInvestigationFor.ID, RelationshipType_UsesTool.ID)...) - - return errs -} - -func (o *SpdxDocument) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.ElementCollection.Validate(visited, path...)...) - - if v, ok := o.DataLicense.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "DataLicense")...)...) - } - - for i, v := range o.Imports { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "Imports", strconv.Itoa(i))...)...) - } - } - - for i, v := range o.NamespaceMaps { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "NamespaceMaps", strconv.Itoa(i))...)...) - } - } - - return errs -} - -func (o *SupportType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, SupportType_Deployed.ID, SupportType_Development.ID, SupportType_EndOfSupport.ID, SupportType_LimitedSupport.ID, SupportType_NoAssertion.ID, SupportType_NoSupport.ID, SupportType_Support.ID)...) - - return errs -} - -func (o *Tool) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Element.Validate(visited, path...)...) - - return errs -} - -func (o *DatasetConfidentialityLevelType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, DatasetConfidentialityLevelType_Amber.ID, DatasetConfidentialityLevelType_Clear.ID, DatasetConfidentialityLevelType_Green.ID, DatasetConfidentialityLevelType_Red.ID)...) - - return errs -} - -func (o *DatasetDatasetAvailabilityType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, DatasetDatasetAvailabilityType_Clickthrough.ID, DatasetDatasetAvailabilityType_DirectDownload.ID, DatasetDatasetAvailabilityType_Query.ID, DatasetDatasetAvailabilityType_Registration.ID, DatasetDatasetAvailabilityType_ScrapingScript.ID)...) - - return errs -} - -func (o *DatasetDatasetType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, DatasetDatasetType_Audio.ID, DatasetDatasetType_Categorical.ID, DatasetDatasetType_Graph.ID, DatasetDatasetType_Image.ID, DatasetDatasetType_NoAssertion.ID, DatasetDatasetType_Numeric.ID, DatasetDatasetType_Other.ID, DatasetDatasetType_Sensor.ID, DatasetDatasetType_Structured.ID, DatasetDatasetType_Syntactic.ID, DatasetDatasetType_Text.ID, DatasetDatasetType_Timeseries.ID, DatasetDatasetType_Timestamp.ID, DatasetDatasetType_Video.ID)...) - - return errs -} - -func (o *ExpandedlicensingLicenseAddition) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Element.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required/min/max/etc. - - // TODO: check for required - return errs -} - -func (o *ExpandedlicensingListedLicenseException) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.ExpandedlicensingLicenseAddition.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *ExtensionCdxPropertyEntry) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *ExtensionExtension) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - return errs -} - -func (o *SecurityCvssSeverityType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, SecurityCvssSeverityType_Critical.ID, SecurityCvssSeverityType_High.ID, SecurityCvssSeverityType_Low.ID, SecurityCvssSeverityType_Medium.ID, SecurityCvssSeverityType_None.ID)...) - - return errs -} - -func (o *SecurityExploitCatalogType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, SecurityExploitCatalogType_Kev.ID, SecurityExploitCatalogType_Other.ID)...) - - return errs -} - -func (o *SecuritySsvcDecisionType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, SecuritySsvcDecisionType_Act.ID, SecuritySsvcDecisionType_Attend.ID, SecuritySsvcDecisionType_Track.ID, SecuritySsvcDecisionType_TrackStar.ID)...) - - return errs -} - -func (o *SecurityVexJustificationType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, SecurityVexJustificationType_ComponentNotPresent.ID, SecurityVexJustificationType_InlineMitigationsAlreadyExist.ID, SecurityVexJustificationType_VulnerableCodeCannotBeControlledByAdversary.ID, SecurityVexJustificationType_VulnerableCodeNotInExecutePath.ID, SecurityVexJustificationType_VulnerableCodeNotPresent.ID)...) - - return errs -} - -func (o *SecurityVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Relationship.Validate(visited, path...)...) - - if v, ok := o.SuppliedBy.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "SuppliedBy")...)...) - } - - if v, ok := o.SecurityAssessedElement.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "SecurityAssessedElement")...)...) - } - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *SimplelicensingAnyLicenseInfo) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Element.Validate(visited, path...)...) - - return errs -} - -func (o *SimplelicensingLicenseExpression) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) - - for i, v := range o.SimplelicensingCustomIdToUris { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "SimplelicensingCustomIdToUris", strconv.Itoa(i))...)...) - } - } - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *SimplelicensingSimpleLicensingText) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Element.Validate(visited, path...)...) - - // TODO: check for required - return errs -} - -func (o *SoftwareContentIdentifier) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.IntegrityMethod.Validate(visited, path...)...) - - if o.SoftwareContentIdentifierType.ID == "" { - errs = append(errs, newValidationError(append(path, "SoftwareContentIdentifierType"), fmt.Errorf("required"))) - } - errs = append(errs, o.SoftwareContentIdentifierType.Validate(visited, append(path, "SoftwareContentIdentifierType")...)...) - - // TODO: check for required - return errs -} - -func (o *SoftwareContentIdentifierType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, SoftwareContentIdentifierType_Gitoid.ID, SoftwareContentIdentifierType_Swhid.ID)...) - - return errs -} - -func (o *SoftwareFileKindType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, SoftwareFileKindType_Directory.ID, SoftwareFileKindType_File.ID)...) - - return errs -} - -func (o *SoftwareSbomType) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, SoftwareSbomType_Analyzed.ID, SoftwareSbomType_Build.ID, SoftwareSbomType_Deployed.ID, SoftwareSbomType_Design.ID, SoftwareSbomType_Runtime.ID, SoftwareSbomType_Source.ID)...) - - return errs -} - -func (o *SoftwareSoftwarePurpose) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - - errs = append(errs, validateInValues(path, o.ID, SoftwareSoftwarePurpose_Application.ID, SoftwareSoftwarePurpose_Archive.ID, SoftwareSoftwarePurpose_Bom.ID, SoftwareSoftwarePurpose_Configuration.ID, SoftwareSoftwarePurpose_Container.ID, SoftwareSoftwarePurpose_Data.ID, SoftwareSoftwarePurpose_Device.ID, SoftwareSoftwarePurpose_DeviceDriver.ID, SoftwareSoftwarePurpose_DiskImage.ID, SoftwareSoftwarePurpose_Documentation.ID, SoftwareSoftwarePurpose_Evidence.ID, SoftwareSoftwarePurpose_Executable.ID, SoftwareSoftwarePurpose_File.ID, SoftwareSoftwarePurpose_FilesystemImage.ID, SoftwareSoftwarePurpose_Firmware.ID, SoftwareSoftwarePurpose_Framework.ID, SoftwareSoftwarePurpose_Install.ID, SoftwareSoftwarePurpose_Library.ID, SoftwareSoftwarePurpose_Manifest.ID, SoftwareSoftwarePurpose_Model.ID, SoftwareSoftwarePurpose_Module.ID, SoftwareSoftwarePurpose_OperatingSystem.ID, SoftwareSoftwarePurpose_Other.ID, SoftwareSoftwarePurpose_Patch.ID, SoftwareSoftwarePurpose_Platform.ID, SoftwareSoftwarePurpose_Requirement.ID, SoftwareSoftwarePurpose_Source.ID, SoftwareSoftwarePurpose_Specification.ID, SoftwareSoftwarePurpose_Test.ID)...) - - return errs -} - -func (o *BuildBuild) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Element.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - - for i, v := range o.BuildConfigSourceDigests { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "BuildConfigSourceDigests", strconv.Itoa(i))...)...) - } - } - - // TODO: check for required/min/max/etc. - - // TODO: check for required/min/max/etc. - - for i, v := range o.BuildEnvironments { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "BuildEnvironments", strconv.Itoa(i))...)...) - } - } - - for i, v := range o.BuildParameters { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "BuildParameters", strconv.Itoa(i))...)...) - } - } - - return errs -} - -func (o *Agent) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Element.Validate(visited, path...)...) - - return errs -} - -func (o *Annotation) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Element.Validate(visited, path...)...) - - if o.AnnotationType.ID == "" { - errs = append(errs, newValidationError(append(path, "AnnotationType"), fmt.Errorf("required"))) - } - errs = append(errs, o.AnnotationType.Validate(visited, append(path, "AnnotationType")...)...) - - // TODO: check for required - - // TODO: check for required - - if v, ok := o.Subject.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "Subject")...)...) - } - - return errs -} - -func (o *Artifact) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Element.Validate(visited, path...)...) - - // TODO: check for required - - for i, v := range o.OriginatedBys { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "OriginatedBys", strconv.Itoa(i))...)...) - } - } - - // TODO: check for required - - // TODO: check for required/min/max/etc. - - if v, ok := o.SuppliedBy.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "SuppliedBy")...)...) - } - - for _, v := range o.SupportLevels { - errs = append(errs, v.Validate(visited, append(path, "SupportLevels")...)...) - } - - // TODO: check for required - return errs -} - -func (o *Bundle) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.ElementCollection.Validate(visited, path...)...) - - // TODO: check for required - return errs -} - -func (o *Hash) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.IntegrityMethod.Validate(visited, path...)...) - - if o.Algorithm.ID == "" { - errs = append(errs, newValidationError(append(path, "Algorithm"), fmt.Errorf("required"))) - } - errs = append(errs, o.Algorithm.Validate(visited, append(path, "Algorithm")...)...) - - // TODO: check for required - return errs -} - -func (o *LifecycleScopedRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Relationship.Validate(visited, path...)...) - - errs = append(errs, o.Scope.Validate(visited, append(path, "Scope")...)...) - - return errs -} - -func (o *Organization) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Agent.Validate(visited, path...)...) - - return errs -} - -func (o *Person) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Agent.Validate(visited, path...)...) - - return errs -} - -func (o *SoftwareAgent) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Agent.Validate(visited, path...)...) - - return errs -} - -func (o *ExpandedlicensingConjunctiveLicenseSet) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) - - for i, v := range o.ExpandedlicensingMembers { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "ExpandedlicensingMembers", strconv.Itoa(i))...)...) - } - } - - return errs -} - -func (o *ExpandedlicensingCustomLicenseAddition) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.ExpandedlicensingLicenseAddition.Validate(visited, path...)...) - - return errs -} - -func (o *ExpandedlicensingDisjunctiveLicenseSet) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) - - for i, v := range o.ExpandedlicensingMembers { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "ExpandedlicensingMembers", strconv.Itoa(i))...)...) - } - } - - return errs -} - -func (o *ExpandedlicensingExtendableLicense) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) - - return errs -} - -func (o *ExpandedlicensingIndividualLicensingInfo) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) - - errs = append(errs, validateInValues(path, o.ID, ExpandedlicensingIndividualLicensingInfo_NoAssertionLicense.ID, ExpandedlicensingIndividualLicensingInfo_NoneLicense.ID)...) - - return errs -} - -func (o *ExpandedlicensingLicense) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.ExpandedlicensingExtendableLicense.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required/min/max/etc. - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *ExpandedlicensingListedLicense) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.ExpandedlicensingLicense.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *ExpandedlicensingOrLaterOperator) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.ExpandedlicensingExtendableLicense.Validate(visited, path...)...) - - if v, ok := o.ExpandedlicensingSubjectLicense.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "ExpandedlicensingSubjectLicense")...)...) - } - - return errs -} - -func (o *ExpandedlicensingWithAdditionOperator) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SimplelicensingAnyLicenseInfo.Validate(visited, path...)...) - - if v, ok := o.ExpandedlicensingSubjectAddition.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "ExpandedlicensingSubjectAddition")...)...) - } - - if v, ok := o.ExpandedlicensingSubjectExtendableLicense.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "ExpandedlicensingSubjectExtendableLicense")...)...) - } - - return errs -} - -func (o *ExtensionCdxPropertiesExtension) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.ExtensionExtension.Validate(visited, path...)...) - - for i, v := range o.ExtensionCdxPropertys { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "ExtensionCdxPropertys", strconv.Itoa(i))...)...) - } - } - - return errs -} - -func (o *SecurityCvssV2VulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *SecurityCvssV3VulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) - - // TODO: check for required - - if o.SecuritySeverity.ID == "" { - errs = append(errs, newValidationError(append(path, "SecuritySeverity"), fmt.Errorf("required"))) - } - errs = append(errs, o.SecuritySeverity.Validate(visited, append(path, "SecuritySeverity")...)...) - - // TODO: check for required - return errs -} - -func (o *SecurityCvssV4VulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) - - // TODO: check for required - - if o.SecuritySeverity.ID == "" { - errs = append(errs, newValidationError(append(path, "SecuritySeverity"), fmt.Errorf("required"))) - } - errs = append(errs, o.SecuritySeverity.Validate(visited, append(path, "SecuritySeverity")...)...) - - // TODO: check for required - return errs -} - -func (o *SecurityEpssVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *SecurityExploitCatalogVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) - - if o.SecurityCatalogType.ID == "" { - errs = append(errs, newValidationError(append(path, "SecurityCatalogType"), fmt.Errorf("required"))) - } - errs = append(errs, o.SecurityCatalogType.Validate(visited, append(path, "SecurityCatalogType")...)...) - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *SecuritySsvcVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) - - if o.SecurityDecisionType.ID == "" { - errs = append(errs, newValidationError(append(path, "SecurityDecisionType"), fmt.Errorf("required"))) - } - errs = append(errs, o.SecurityDecisionType.Validate(visited, append(path, "SecurityDecisionType")...)...) - - return errs -} - -func (o *SecurityVexVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SecurityVulnAssessmentRelationship.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *SecurityVulnerability) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Artifact.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *SoftwareSoftwareArtifact) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Artifact.Validate(visited, path...)...) - - for _, v := range o.SoftwareAdditionalPurposes { - errs = append(errs, v.Validate(visited, append(path, "SoftwareAdditionalPurposes")...)...) - } - - // TODO: check for required/min/max/etc. - - for i, v := range o.SoftwareContentIdentifiers { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "SoftwareContentIdentifiers", strconv.Itoa(i))...)...) - } - } - - // TODO: check for required - - errs = append(errs, o.SoftwarePrimaryPurpose.Validate(visited, append(path, "SoftwarePrimaryPurpose")...)...) - - return errs -} - -func (o *Bom) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Bundle.Validate(visited, path...)...) - - return errs -} - -func (o *ExpandedlicensingCustomLicense) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.ExpandedlicensingLicense.Validate(visited, path...)...) - - return errs -} - -func (o *SecurityVexAffectedVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SecurityVexVulnAssessmentRelationship.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *SecurityVexFixedVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SecurityVexVulnAssessmentRelationship.Validate(visited, path...)...) - - return errs -} - -func (o *SecurityVexNotAffectedVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SecurityVexVulnAssessmentRelationship.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - - errs = append(errs, o.SecurityJustificationType.Validate(visited, append(path, "SecurityJustificationType")...)...) - - return errs -} - -func (o *SecurityVexUnderInvestigationVulnAssessmentRelationship) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SecurityVexVulnAssessmentRelationship.Validate(visited, path...)...) - - return errs -} - -func (o *SoftwareFile) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SoftwareSoftwareArtifact.Validate(visited, path...)...) - - // TODO: check for required - - errs = append(errs, o.SoftwareFileKind.Validate(visited, append(path, "SoftwareFileKind")...)...) - - return errs -} - -func (o *SoftwarePackage) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SoftwareSoftwareArtifact.Validate(visited, path...)...) - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - return errs -} - -func (o *SoftwareSbom) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.Bom.Validate(visited, path...)...) - - for _, v := range o.SoftwareSbomTypes { - errs = append(errs, v.Validate(visited, append(path, "SoftwareSbomTypes")...)...) - } - - return errs -} - -func (o *SoftwareSnippet) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SoftwareSoftwareArtifact.Validate(visited, path...)...) - - if v, ok := o.SoftwareByteRange.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "SoftwareByteRange")...)...) - } - - if v, ok := o.SoftwareLineRange.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "SoftwareLineRange")...)...) - } - - if v, ok := o.SoftwareSnippetFromFile.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "SoftwareSnippetFromFile")...)...) - } - - return errs -} - -func (o *AiAIPackage) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SoftwarePackage.Validate(visited, path...)...) - - errs = append(errs, o.AiAutonomyType.Validate(visited, append(path, "AiAutonomyType")...)...) - - // TODO: check for required/min/max/etc. - - if v, ok := o.AiEnergyConsumption.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "AiEnergyConsumption")...)...) - } - - for i, v := range o.AiHyperparameters { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "AiHyperparameters", strconv.Itoa(i))...)...) - } - } - - // TODO: check for required - - // TODO: check for required - - // TODO: check for required - - for i, v := range o.AiMetrics { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "AiMetrics", strconv.Itoa(i))...)...) - } - } - - for i, v := range o.AiMetricDecisionThresholds { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "AiMetricDecisionThresholds", strconv.Itoa(i))...)...) - } - } - - // TODO: check for required/min/max/etc. - - // TODO: check for required/min/max/etc. - - errs = append(errs, o.AiSafetyRiskAssessment.Validate(visited, append(path, "AiSafetyRiskAssessment")...)...) - - // TODO: check for required/min/max/etc. - - // TODO: check for required/min/max/etc. - - errs = append(errs, o.AiUseSensitivePersonalInformation.Validate(visited, append(path, "AiUseSensitivePersonalInformation")...)...) - - return errs -} - -func (o *DatasetDatasetPackage) Validate(visited map[any]struct{}, path ...string) []ValidationError { - if visited == nil { - visited = map[any]struct{}{} - } - if _, ok := visited[o]; ok { - return nil - } - visited[o] = struct{}{} - var errs []ValidationError - errs = append(errs, o.SoftwarePackage.Validate(visited, path...)...) - - // TODO: check for required/min/max/etc. - - errs = append(errs, o.DatasetConfidentialityLevel.Validate(visited, append(path, "DatasetConfidentialityLevel")...)...) - - // TODO: check for required - - // TODO: check for required/min/max/etc. - - errs = append(errs, o.DatasetDatasetAvailability.Validate(visited, append(path, "DatasetDatasetAvailability")...)...) - - // TODO: check for required - - // TODO: check for required - - if len(o.DatasetDatasetTypes) < 1 { - errs = append(errs, newValidationError(append(path, "DatasetDatasetTypes"), fmt.Errorf("required min count: %v", 1))) - } - for _, v := range o.DatasetDatasetTypes { - errs = append(errs, v.Validate(visited, append(path, "DatasetDatasetTypes")...)...) - } - - // TODO: check for required - - errs = append(errs, o.DatasetHasSensitivePersonalInformation.Validate(visited, append(path, "DatasetHasSensitivePersonalInformation")...)...) - - // TODO: check for required - - // TODO: check for required/min/max/etc. - - for i, v := range o.DatasetSensors { - if v, ok := v.(validator); ok { - errs = append(errs, v.Validate(visited, append(path, "DatasetSensors", strconv.Itoa(i))...)...) - } - } - - return errs -} From a9d84dcb32f5e37b3aab20d98a252b87a6cca80d Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Wed, 12 Mar 2025 02:54:46 -0400 Subject: [PATCH 8/8] chore: functional converter with spdx 3 Signed-off-by: Keith Zantow --- convert/chain.go | 13 +++-- go.mod | 4 +- go.sum | 4 +- spdx/v2/v2_1/document.go | 9 ---- spdx/v2/v2_2/document.go | 10 ++-- spdx/v2/v2_3/document.go | 10 ++-- spdx/v3/v3_0/model.go | 100 ++++++++++++++++++++++++++++++++++++--- spdx/v3/v3_0/spdx.go | 63 +++++++++++++++++------- 8 files changed, 161 insertions(+), 52 deletions(-) diff --git a/convert/chain.go b/convert/chain.go index ac96733c..b0e8a924 100644 --- a/convert/chain.go +++ b/convert/chain.go @@ -9,17 +9,20 @@ import ( converter "github.com/anchore/go-struct-converter" "github.com/spdx/tools-golang/spdx/common" - "github.com/spdx/tools-golang/spdx/v2/v2_1" "github.com/spdx/tools-golang/spdx/v2/v2_2" "github.com/spdx/tools-golang/spdx/v2/v2_3" + "github.com/spdx/tools-golang/spdx/v3/v3_0" ) -var DocumentChain = converter.NewChain( - v2_1.Document{}, - v2_2.Document{}, - v2_3.Document{}, +var DocumentChain = converter.NewFuncChain( + v2_3.To_v2_2, v2_3.From_v2_2, + v2_2.From_v2_1, v2_2.To_v2_1, + v3_0.From_v2_3, ) +//). +// AutoPackageConverter(v3_0.Document{}, v2_3.Document{}) + // Document converts from one document to another document // For example, converting a document to the latest version could be done like: // diff --git a/go.mod b/go.mod index 07576e5d..82cd007e 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/spdx/tools-golang -go 1.23.0 +go 1.23.5 require ( - github.com/anchore/go-struct-converter v0.0.0-20240925125616-a0883641c664 + github.com/anchore/go-struct-converter v0.0.0-20250211213226-cce56d595160 github.com/davecgh/go-spew v1.1.1 github.com/google/go-cmp v0.6.0 github.com/kzantow/go-ld v0.0.0-20250305231540-23fb13522625 diff --git a/go.sum b/go.sum index 235de752..3be18cd4 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/anchore/go-struct-converter v0.0.0-20240925125616-a0883641c664 h1:TcUCZsLGIXJbqo9z9VX436XdpIyZ5Cs3b8XTIp+jRxs= -github.com/anchore/go-struct-converter v0.0.0-20240925125616-a0883641c664/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= +github.com/anchore/go-struct-converter v0.0.0-20250211213226-cce56d595160 h1:r8/1fxpbDMlQO6GgQiud1uL5eAu3p/NVUmfNx95/KY8= +github.com/anchore/go-struct-converter v0.0.0-20250211213226-cce56d595160/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/spdx/v2/v2_1/document.go b/spdx/v2/v2_1/document.go index bd6b41d4..5f69a790 100644 --- a/spdx/v2/v2_1/document.go +++ b/spdx/v2/v2_1/document.go @@ -4,8 +4,6 @@ package v2_1 import ( - converter "github.com/anchore/go-struct-converter" - "github.com/spdx/tools-golang/spdx/v2/common" ) @@ -70,10 +68,3 @@ type Document struct { // DEPRECATED in version 2.0 of spec Reviews []*Review `json:"-"` } - -func (d *Document) ConvertFrom(_ interface{}) error { - d.SPDXVersion = Version - return nil -} - -var _ converter.ConvertFrom = (*Document)(nil) diff --git a/spdx/v2/v2_2/document.go b/spdx/v2/v2_2/document.go index 5fcd33aa..b0371571 100644 --- a/spdx/v2/v2_2/document.go +++ b/spdx/v2/v2_2/document.go @@ -7,9 +7,8 @@ import ( "encoding/json" "fmt" - converter "github.com/anchore/go-struct-converter" - "github.com/spdx/tools-golang/spdx/v2/common" + "github.com/spdx/tools-golang/spdx/v2/v2_1" ) const Version = "SPDX-2.2" @@ -74,12 +73,13 @@ type Document struct { Reviews []*Review `json:"-"` } -func (d *Document) ConvertFrom(_ interface{}) error { +func From_v2_1(_ v2_1.Document, d *Document) { d.SPDXVersion = Version - return nil } -var _ converter.ConvertFrom = (*Document)(nil) +func To_v2_1(_ Document, d *v2_1.Document) { + d.SPDXVersion = v2_1.Version +} func (d *Document) UnmarshalJSON(b []byte) error { type doc Document diff --git a/spdx/v2/v2_3/document.go b/spdx/v2/v2_3/document.go index 62b7619b..eaf3463f 100644 --- a/spdx/v2/v2_3/document.go +++ b/spdx/v2/v2_3/document.go @@ -7,9 +7,8 @@ import ( "encoding/json" "fmt" - converter "github.com/anchore/go-struct-converter" - "github.com/spdx/tools-golang/spdx/v2/common" + "github.com/spdx/tools-golang/spdx/v2/v2_2" ) const Version = "SPDX-2.3" @@ -73,12 +72,13 @@ type Document struct { Reviews []*Review `json:"-" yaml:"-"` } -func (d *Document) ConvertFrom(_ interface{}) error { +func From_v2_2(_ v2_2.Document, d *Document) { d.SPDXVersion = Version - return nil } -var _ converter.ConvertFrom = (*Document)(nil) +func To_v2_2(_ Document, d *v2_2.Document) { + d.SPDXVersion = v2_2.Version +} func (d *Document) UnmarshalJSON(b []byte) error { type doc Document diff --git a/spdx/v3/v3_0/model.go b/spdx/v3/v3_0/model.go index a306446c..53864b3f 100755 --- a/spdx/v3/v3_0/model.go +++ b/spdx/v3/v3_0/model.go @@ -12,6 +12,7 @@ import ( ) type AnyAIPackage interface { + AnyPackage asAIPackage() *AIPackage } @@ -62,6 +63,7 @@ func (o *AIPackageList) AIPackages() ld.TypeSeq[AnyAIPackage, *AIPackage] { } type AnyAgent interface { + AnyElement asAgent() *Agent } @@ -94,6 +96,7 @@ func (o *AgentList) SoftwareAgents() ld.TypeSeq[AnyAgent, *SoftwareAgent] { } type AnyAnnotation interface { + AnyElement asAnnotation() *Annotation } @@ -138,6 +141,7 @@ var AnnotationType_Review = AnnotationType{ } type AnyArtifact interface { + AnyElement asArtifact() *Artifact } @@ -200,6 +204,7 @@ func (o *ArtifactList) Vulnerabilities() ld.TypeSeq[AnyArtifact, *Vulnerability] } type AnyBom interface { + AnyBundle asBom() *Bom } @@ -224,6 +229,7 @@ func (o *BomList) Sboms() ld.TypeSeq[AnyBom, *Sbom] { } type AnyBuild interface { + AnyElement asBuild() *Build } @@ -262,6 +268,7 @@ func (o *BuildList) Builds() ld.TypeSeq[AnyBuild, *Build] { } type AnyBundle interface { + AnyElementCollection asBundle() *Bundle } @@ -292,6 +299,7 @@ func (o *BundleList) Sboms() ld.TypeSeq[AnyBundle, *Sbom] { } type AnyCdxPropertiesExtension interface { + AnyExtension asCdxPropertiesExtension() *CdxPropertiesExtension } @@ -364,6 +372,7 @@ var ConfidentialityLevelType_Red = ConfidentialityLevelType{ } type AnyConjunctiveLicenseSet interface { + AnyLicenseInfo asConjunctiveLicenseSet() *ConjunctiveLicenseSet } @@ -386,6 +395,7 @@ func (o *ConjunctiveLicenseSetList) ConjunctiveLicenseSets() ld.TypeSeq[AnyConju } type AnyContentIdentifier interface { + AnyIntegrityMethod asContentIdentifier() *ContentIdentifier } @@ -456,6 +466,7 @@ func (o *CreationInfoList) CreationInfos() ld.TypeSeq[AnyCreationInfo, *Creation } type AnyCustomLicense interface { + AnyLicense asCustomLicense() *CustomLicense } @@ -476,6 +487,7 @@ func (o *CustomLicenseList) CustomLicenses() ld.TypeSeq[AnyCustomLicense, *Custo } type AnyCustomLicenseAddition interface { + AnyLicenseAddition asCustomLicenseAddition() *CustomLicenseAddition } @@ -527,6 +539,7 @@ var CvssSeverityType_None = CvssSeverityType{ } type AnyCvssV2VulnAssessmentRelationship interface { + AnyVulnAssessmentRelationship asCvssV2VulnAssessmentRelationship() *CvssV2VulnAssessmentRelationship } @@ -551,6 +564,7 @@ func (o *CvssV2VulnAssessmentRelationshipList) CvssV2VulnAssessmentRelationships } type AnyCvssV3VulnAssessmentRelationship interface { + AnyVulnAssessmentRelationship asCvssV3VulnAssessmentRelationship() *CvssV3VulnAssessmentRelationship } @@ -577,6 +591,7 @@ func (o *CvssV3VulnAssessmentRelationshipList) CvssV3VulnAssessmentRelationships } type AnyCvssV4VulnAssessmentRelationship interface { + AnyVulnAssessmentRelationship asCvssV4VulnAssessmentRelationship() *CvssV4VulnAssessmentRelationship } @@ -634,6 +649,7 @@ var DatasetAvailabilityType_ScrapingScript = DatasetAvailabilityType{ } type AnyDatasetPackage interface { + AnyPackage asDatasetPackage() *DatasetPackage } @@ -780,6 +796,7 @@ func (o *DictionaryEntryList) DictionaryEntries() ld.TypeSeq[AnyDictionaryEntry, } type AnyDisjunctiveLicenseSet interface { + AnyLicenseInfo asDisjunctiveLicenseSet() *DisjunctiveLicenseSet } @@ -816,7 +833,7 @@ type Element struct { // Name Identifies the name of an Element as designated by the creator. Name string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/name" type:"http://www.w3.org/2001/XMLSchema#string"` // Extensions Specifies an Extension characterization of some aspect of an Element. - Extensions []Extension `iri:"https://spdx.org/rdf/3.0.1/terms/Core/extension" type:"https://spdx.org/rdf/3.0.1/terms/Extension/Extension"` + Extensions ExtensionList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/extension" type:"https://spdx.org/rdf/3.0.1/terms/Extension/Extension"` // CreationInfo Provides information about the creation of the Element. CreationInfo AnyCreationInfo `iri:"https://spdx.org/rdf/3.0.1/terms/Core/creationInfo" required:"true" type:"https://spdx.org/rdf/3.0.1/terms/Core/CreationInfo"` // ExternalIdentifiers Provides a reference to a resource outside the scope of SPDX-3.0 content\nthat uniquely identifies an Element. @@ -825,8 +842,8 @@ type Element struct { ExternalRefs ExternalRefList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalRef" type:"https://spdx.org/rdf/3.0.1/terms/Core/ExternalRef"` // Summary A short description of an Element. Summary string `iri:"https://spdx.org/rdf/3.0.1/terms/Core/summary" type:"http://www.w3.org/2001/XMLSchema#string"` - // VerifiedUsings Provides an IntegrityMethod with which the integrity of an Element can be\nasserted. - VerifiedUsings IntegrityMethodList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/verifiedUsing" type:"https://spdx.org/rdf/3.0.1/terms/Core/IntegrityMethod"` + // VerifiedUsing Provides an IntegrityMethod with which the integrity of an Element can be\nasserted. + VerifiedUsing IntegrityMethodList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/verifiedUsing" type:"https://spdx.org/rdf/3.0.1/terms/Core/IntegrityMethod"` } func (o *Element) asElement() *Element { @@ -1040,6 +1057,7 @@ func (o *ElementList) WithAdditionOperators() ld.TypeSeq[AnyElement, *WithAdditi } type AnyElementCollection interface { + AnyElement asElementCollection() *ElementCollection } @@ -1153,6 +1171,7 @@ var EnergyUnitType_Other = EnergyUnitType{ } type AnyEpssVulnAssessmentRelationship interface { + AnyVulnAssessmentRelationship asEpssVulnAssessmentRelationship() *EpssVulnAssessmentRelationship } @@ -1193,6 +1212,7 @@ var ExploitCatalogType_Other = ExploitCatalogType{ } type AnyExploitCatalogVulnAssessmentRelationship interface { + AnyVulnAssessmentRelationship asExploitCatalogVulnAssessmentRelationship() *ExploitCatalogVulnAssessmentRelationship } @@ -1219,6 +1239,7 @@ func (o *ExploitCatalogVulnAssessmentRelationshipList) ExploitCatalogVulnAssessm } type AnyExtendableLicense interface { + AnyLicenseInfo asExtendableLicense() *ExtendableLicense } @@ -1254,11 +1275,30 @@ func (o *ExtendableLicenseList) OrLaterOperators() ld.TypeSeq[AnyExtendableLicen return ld.NewTypeSeq(*o, castOrLaterOperator) } +type AnyExtension interface { + asExtension() *Extension +} + // Extension A characterization of some aspect of an Element that is associated with the Element in a generalized fashion. type Extension struct { _ ld.Type `iri:"https://spdx.org/rdf/3.0.1/terms/Extension/Extension"` - id string `iri:"@id"` + ID string `iri:"@id"` +} + +func (o *Extension) asExtension() *Extension { + return o +} + +type ExtensionList []AnyExtension + +func (o *ExtensionList) CdxPropertiesExtensions() ld.TypeSeq[AnyExtension, *CdxPropertiesExtension] { + return ld.NewTypeSeq(*o, castCdxPropertiesExtension) } + +func (o *ExtensionList) Extensions() ld.TypeSeq[AnyExtension, *Extension] { + return ld.NewTypeSeq(*o, castExtension) +} + type AnyExternalIdentifier interface { asExternalIdentifier() *ExternalIdentifier } @@ -1362,8 +1402,8 @@ type ExternalMap struct { ExternalSpdxId ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Core/externalSpdxId" required:"true" type:"http://www.w3.org/2001/XMLSchema#anyURI"` // LocationHint Provides an indication of where to retrieve an external Element. LocationHint ld.URI `iri:"https://spdx.org/rdf/3.0.1/terms/Core/locationHint" type:"http://www.w3.org/2001/XMLSchema#anyURI"` - // VerifiedUsings Provides an IntegrityMethod with which the integrity of an Element can be\nasserted. - VerifiedUsings IntegrityMethodList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/verifiedUsing" type:"https://spdx.org/rdf/3.0.1/terms/Core/IntegrityMethod"` + // VerifiedUsing Provides an IntegrityMethod with which the integrity of an Element can be\nasserted. + VerifiedUsing IntegrityMethodList `iri:"https://spdx.org/rdf/3.0.1/terms/Core/verifiedUsing" type:"https://spdx.org/rdf/3.0.1/terms/Core/IntegrityMethod"` // DefiningArtifact Artifact representing a serialization instance of SPDX data containing the\ndefinition of a particular Element. DefiningArtifact AnyArtifact `iri:"https://spdx.org/rdf/3.0.1/terms/Core/definingArtifact" type:"https://spdx.org/rdf/3.0.1/terms/Core/Artifact"` } @@ -1643,6 +1683,7 @@ var ExternalRefType_VulnerabilityExploitabilityAssessment = ExternalRefType{ } type AnyFile interface { + AnySoftwareArtifact asFile() *File } @@ -1683,6 +1724,7 @@ var FileKindType_File = FileKindType{ } type AnyHash interface { + AnyIntegrityMethod asHash() *Hash } @@ -1823,6 +1865,7 @@ var HashAlgorithm_Sha512 = HashAlgorithm{ } type AnyIndividualElement interface { + AnyElement asIndividualElement() *IndividualElement } @@ -1853,6 +1896,7 @@ func (o *IndividualElementList) IndividualElements() ld.TypeSeq[AnyIndividualEle } type AnyIndividualLicensingInfo interface { + AnyLicenseInfo asIndividualLicensingInfo() *IndividualLicensingInfo } @@ -1917,6 +1961,7 @@ func (o *IntegrityMethodList) PackageVerificationCodes() ld.TypeSeq[AnyIntegrity } type AnyLicense interface { + AnyExtendableLicense asLicense() *License } @@ -1963,6 +2008,7 @@ func (o *LicenseList) ListedLicenses() ld.TypeSeq[AnyLicense, *ListedLicense] { } type AnyLicenseAddition interface { + AnyElement asLicenseAddition() *LicenseAddition } @@ -2003,6 +2049,7 @@ func (o *LicenseAdditionList) ListedLicenseExceptions() ld.TypeSeq[AnyLicenseAdd } type AnyLicenseExpression interface { + AnyLicenseInfo asLicenseExpression() *LicenseExpression } @@ -2029,6 +2076,7 @@ func (o *LicenseExpressionList) LicenseExpressions() ld.TypeSeq[AnyLicenseExpres } type AnyLicenseInfo interface { + AnyElement asLicenseInfo() *LicenseInfo } @@ -2125,6 +2173,7 @@ var LifecycleScopeType_Test = LifecycleScopeType{ } type AnyLifecycleScopedRelationship interface { + AnyRelationship asLifecycleScopedRelationship() *LifecycleScopedRelationship } @@ -2147,6 +2196,7 @@ func (o *LifecycleScopedRelationshipList) LifecycleScopedRelationships() ld.Type } type AnyListedLicense interface { + AnyLicense asListedLicense() *ListedLicense } @@ -2171,6 +2221,7 @@ func (o *ListedLicenseList) ListedLicenses() ld.TypeSeq[AnyListedLicense, *Liste } type AnyListedLicenseException interface { + AnyLicenseAddition asListedLicenseException() *ListedLicenseException } @@ -2219,6 +2270,7 @@ func (o *NamespaceMapList) NamespaceMaps() ld.TypeSeq[AnyNamespaceMap, *Namespac } type AnyOrLaterOperator interface { + AnyExtendableLicense asOrLaterOperator() *OrLaterOperator } @@ -2241,6 +2293,7 @@ func (o *OrLaterOperatorList) OrLaterOperators() ld.TypeSeq[AnyOrLaterOperator, } type AnyOrganization interface { + AnyAgent asOrganization() *Organization } @@ -2266,6 +2319,7 @@ func (o *OrganizationList) Organizations() ld.TypeSeq[AnyOrganization, *Organiza } type AnyPackage interface { + AnySoftwareArtifact asPackage() *Package } @@ -2304,6 +2358,7 @@ func (o *PackageList) Packages() ld.TypeSeq[AnyPackage, *Package] { } type AnyPackageVerificationCode interface { + AnyIntegrityMethod asPackageVerificationCode() *PackageVerificationCode } @@ -2330,6 +2385,7 @@ func (o *PackageVerificationCodeList) PackageVerificationCodes() ld.TypeSeq[AnyP } type AnyPerson interface { + AnyAgent asPerson() *Person } @@ -2451,6 +2507,7 @@ var ProfileIdentifierType_Software = ProfileIdentifierType{ } type AnyRelationship interface { + AnyElement asRelationship() *Relationship } @@ -2883,6 +2940,7 @@ var SafetyRiskAssessmentType_Serious = SafetyRiskAssessmentType{ } type AnySbom interface { + AnyBom asSbom() *Sbom } @@ -2941,6 +2999,7 @@ var SbomType_Source = SbomType{ } type AnySimpleLicensingText interface { + AnyElement asSimpleLicensingText() *SimpleLicensingText } @@ -2963,6 +3022,7 @@ func (o *SimpleLicensingTextList) SimpleLicensingTexts() ld.TypeSeq[AnySimpleLic } type AnySnippet interface { + AnySoftwareArtifact asSnippet() *Snippet } @@ -2989,6 +3049,7 @@ func (o *SnippetList) Snippets() ld.TypeSeq[AnySnippet, *Snippet] { } type AnySoftwareAgent interface { + AnyAgent asSoftwareAgent() *SoftwareAgent } @@ -3009,6 +3070,7 @@ func (o *SoftwareAgentList) SoftwareAgents() ld.TypeSeq[AnySoftwareAgent, *Softw } type AnySoftwareArtifact interface { + AnyArtifact asSoftwareArtifact() *SoftwareArtifact } @@ -3210,6 +3272,7 @@ var SoftwarePurpose_Test = SoftwarePurpose{ } type AnySpdxDocument interface { + AnyElementCollection asSpdxDocument() *SpdxDocument } @@ -3262,6 +3325,7 @@ var SsvcDecisionType_TrackStar = SsvcDecisionType{ } type AnySsvcVulnAssessmentRelationship interface { + AnyVulnAssessmentRelationship asSsvcVulnAssessmentRelationship() *SsvcVulnAssessmentRelationship } @@ -3325,6 +3389,7 @@ var SupportType_Support = SupportType{ } type AnyTool interface { + AnyElement asTool() *Tool } @@ -3345,6 +3410,7 @@ func (o *ToolList) Tools() ld.TypeSeq[AnyTool, *Tool] { } type AnyVexAffectedVulnAssessmentRelationship interface { + AnyVexVulnAssessmentRelationship asVexAffectedVulnAssessmentRelationship() *VexAffectedVulnAssessmentRelationship } @@ -3369,6 +3435,7 @@ func (o *VexAffectedVulnAssessmentRelationshipList) VexAffectedVulnAssessmentRel } type AnyVexFixedVulnAssessmentRelationship interface { + AnyVexVulnAssessmentRelationship asVexFixedVulnAssessmentRelationship() *VexFixedVulnAssessmentRelationship } @@ -3420,6 +3487,7 @@ var VexJustificationType_VulnerableCodeNotPresent = VexJustificationType{ } type AnyVexNotAffectedVulnAssessmentRelationship interface { + AnyVexVulnAssessmentRelationship asVexNotAffectedVulnAssessmentRelationship() *VexNotAffectedVulnAssessmentRelationship } @@ -3446,6 +3514,7 @@ func (o *VexNotAffectedVulnAssessmentRelationshipList) VexNotAffectedVulnAssessm } type AnyVexUnderInvestigationVulnAssessmentRelationship interface { + AnyVexVulnAssessmentRelationship asVexUnderInvestigationVulnAssessmentRelationship() *VexUnderInvestigationVulnAssessmentRelationship } @@ -3466,6 +3535,7 @@ func (o *VexUnderInvestigationVulnAssessmentRelationshipList) VexUnderInvestigat } type AnyVexVulnAssessmentRelationship interface { + AnyVulnAssessmentRelationship asVexVulnAssessmentRelationship() *VexVulnAssessmentRelationship } @@ -3506,6 +3576,7 @@ func (o *VexVulnAssessmentRelationshipList) VexVulnAssessmentRelationships() ld. } type AnyVulnAssessmentRelationship interface { + AnyRelationship asVulnAssessmentRelationship() *VulnAssessmentRelationship } @@ -3580,6 +3651,7 @@ func (o *VulnAssessmentRelationshipList) VulnAssessmentRelationships() ld.TypeSe } type AnyVulnerability interface { + AnyArtifact asVulnerability() *Vulnerability } @@ -3606,6 +3678,7 @@ func (o *VulnerabilityList) Vulnerabilities() ld.TypeSeq[AnyVulnerability, *Vuln } type AnyWithAdditionOperator interface { + AnyLicenseInfo asWithAdditionOperator() *WithAdditionOperator } @@ -3748,6 +3821,10 @@ func (o *ExternalIRI) asExtendableLicense() *ExtendableLicense { return castExtendableLicense(o.value) } +func (o *ExternalIRI) asExtension() *Extension { + return castExtension(o.value) +} + func (o *ExternalIRI) asExternalIdentifier() *ExternalIdentifier { return castExternalIdentifier(o.value) } @@ -4093,6 +4170,13 @@ func castExtendableLicense(o any) *ExtendableLicense { return nil } +func castExtension(o any) *Extension { + if o, ok := o.(AnyExtension); ok { + return o.asExtension() + } + return nil +} + func castExternalIdentifier(o any) *ExternalIdentifier { if o, ok := o.(AnyExternalIdentifier); ok { return o.asExternalIdentifier() @@ -4477,6 +4561,10 @@ func cast[T any](value any) *T { if v, ok := any(castExtendableLicense(value)).(*T); ok { return v } + case Extension: + if v, ok := any(castExtension(value)).(*T); ok { + return v + } case ExternalIdentifier: if v, ok := any(castExternalIdentifier(value)).(*T); ok { return v diff --git a/spdx/v3/v3_0/spdx.go b/spdx/v3/v3_0/spdx.go index bd00b7f4..5b2f93c9 100644 --- a/spdx/v3/v3_0/spdx.go +++ b/spdx/v3/v3_0/spdx.go @@ -1,6 +1,8 @@ package v3_0 import ( + "bytes" + "encoding/json" "fmt" "io" "reflect" @@ -11,49 +13,70 @@ import ( ) /* -SPDX 3 models and serialization code is generated from some different prototype golang support for shacl2code, in: https://github.com/kzantow-anchore/shacl2code - -To regenerate, use something like this command: -.venv/bin/python -m shacl2code generate -i https://spdx.org/rdf/3.0.1/spdx-model.ttl -i https://spdx.org/rdf/3.0.1/spdx-json-serialize-annotations.ttl -x https://spdx.org/rdf/3.0.1/spdx-context.jsonld golang ---package v3_0 --license MIT ---output $HOME/projects/tools-golang/spdx/v3/v3_0/model.go ---remap-props element=elements,extension=extensions,externalIdentifier=externalIdentifiers,externalRef=externalRefs,rootElement=rootElements +SPDX 3 models and serialization code is generated from github.com/kzantow/go-ld/cmd +To regenerate, run: go run ./cmd */ +const Version = "3.0.1" // TODO is there a way to ascertain this version from generated code programmatically? + type Document struct { - *SpdxDocument + SpdxDocument LDContext ld.Context } +func (d *Document) MarshalJSON() ([]byte, error) { + buf := bytes.Buffer{} + err := d.Write(&buf) + return buf.Bytes(), err +} + func LDContext() ld.Context { return context() } +func (d *Document) Write(w io.Writer) error { + return d.ToJSON(w) +} + func NewDocument(conformance ProfileIdentifierType, name string, createdBy AnyAgent, createdUsing AnyTool) *Document { ci := &CreationInfo{ - SpecVersion: "3.0.1", // TODO is there a way to ascertain this version from generated code programmatically? + SpecVersion: Version, Created: time.Now(), CreatedBy: AgentList{createdBy}, CreatedUsing: ToolList{createdUsing}, } return &Document{ - SpdxDocument: &SpdxDocument{ + SpdxDocument: SpdxDocument{ ElementCollection: ElementCollection{ Element: Element{ Name: name, CreationInfo: ci, }, - ProfileConformances: []ProfileIdentifierType{conformance}, + ProfileConformances: conformanceFrom(conformance), }, }, LDContext: context(), } } +func conformanceFrom(conformance ProfileIdentifierType) []ProfileIdentifierType { + out := []ProfileIdentifierType{ProfileIdentifierType_Core} + switch conformance { + case ProfileIdentifierType_Core: + case ProfileIdentifierType_Software: + out = append(out, conformance) + case ProfileIdentifierType_Ai: + out = append(out, ProfileIdentifierType_Software, conformance) + case ProfileIdentifierType_Dataset: + out = append(out, ProfileIdentifierType_Software, ProfileIdentifierType_Ai, conformance) + } + return out +} + func (d *Document) Validate(setCreationInfo bool) error { if setCreationInfo { // all Elements need to have creationInfo set... - d.setCreationInfo(d.SpdxDocument.CreationInfo, d.SpdxDocument) + d.setCreationInfo(d.SpdxDocument.CreationInfo, &d.SpdxDocument) } return ld.ValidateGraph(d.SpdxDocument) } @@ -69,20 +92,24 @@ func (d *Document) Append(e ...AnyElement) { // ... and after this initial processing, outputs the document as compact JSON LD, // including accounting for empty IDs by outputting blank node spdxId values func (d *Document) ToJSON(writer io.Writer) error { - if d.SpdxDocument == nil { - return fmt.Errorf("no document object created") - } - // all Elements need to have creationInfo set... - d.setCreationInfo(d.SpdxDocument.CreationInfo, d.SpdxDocument) + d.setCreationInfo(d.SpdxDocument.CreationInfo, &d.SpdxDocument) // ensure the Elements d.ensureAllDocumentElements() + if d.LDContext == nil { + d.LDContext = context() + } return d.LDContext.ToJSON(writer, d.SpdxDocument) } +var _ json.Marshaler = (*Document)(nil) + func (d *Document) setCreationInfo(creationInfo AnyCreationInfo, doc *SpdxDocument) { + if creationInfo == nil { + return + } creationInfoInterfaceType := reflect.TypeOf((*AnyCreationInfo)(nil)).Elem() ci := reflect.ValueOf(creationInfo) _ = ld.VisitObjectGraph(doc, func(path []any, value reflect.Value) error { @@ -101,7 +128,7 @@ func (d *Document) FromJSON(reader io.Reader) error { } for _, e := range graph { if doc, ok := e.(*SpdxDocument); ok { - d.SpdxDocument = doc + d.SpdxDocument = *doc return nil } }