cyclonedx.model.license ======================= .. py:module:: cyclonedx.model.license .. autoapi-nested-parse:: License related things Attributes ---------- .. autoapisummary:: cyclonedx.model.license.LicenseExpressionAcknowledgement cyclonedx.model.license.License Classes ------- .. autoapisummary:: cyclonedx.model.license.LicenseAcknowledgement cyclonedx.model.license.DisjunctiveLicense cyclonedx.model.license.LicenseExpression cyclonedx.model.license.LicenseRepository Module Contents --------------- .. py:class:: LicenseAcknowledgement Bases: :py:obj:`str`, :py:obj:`enum.Enum` This is our internal representation of the `type_licenseAcknowledgementEnumerationType` ENUM type within the CycloneDX standard. .. note:: Introduced in CycloneDX v1.6 .. note:: See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_licenseAcknowledgementEnumerationType .. py:attribute:: CONCLUDED :value: 'concluded' .. py:attribute:: DECLARED :value: 'declared' .. py:data:: LicenseExpressionAcknowledgement Deprecated — Alias for :class:`LicenseAcknowledgement` .. deprecated:: next Import `LicenseAcknowledgement` instead. The exported original symbol itself is NOT deprecated - only this import path. .. py:class:: DisjunctiveLicense This is our internal representation of `licenseType` complex type that can be used in multiple places within a CycloneDX BOM document. .. note:: See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_licenseType .. py:attribute:: id :type: Optional[str] .. py:attribute:: name :type: Optional[str] .. py:attribute:: bom_ref :type: cyclonedx.model.bom_ref.BomRef .. py:attribute:: text :type: Optional[cyclonedx.model.AttachedText] .. py:attribute:: url :type: Optional[cyclonedx.model.XsUri] .. py:attribute:: acknowledgement :type: Optional[LicenseAcknowledgement] .. py:class:: LicenseExpression This is our internal representation of `licenseType`'s expression type that can be used in multiple places within a CycloneDX BOM document. .. note:: See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/json/#components_items_licenses_items_expression .. py:attribute:: value :type: str .. py:attribute:: bom_ref :type: cyclonedx.model.bom_ref.BomRef .. py:attribute:: acknowledgement :type: Optional[LicenseAcknowledgement] .. py:data:: License TypeAlias for a union of supported license models. - :class:`LicenseExpression` - :class:`DisjunctiveLicense` .. py:class:: LicenseRepository Bases: :py:obj:`sortedcontainers.SortedSet`\ [\ :py:obj:`License`\ ] Collection of :class:`License`. This is a `set`, not a `list`. Order MUST NOT matter here. If you wanted a certain order, then you should also express whether the items are concat by `AND` or `OR`. If you wanted to do so, you should use :class:`LicenseExpression`. As a model, this MUST accept multiple :class:`LicenseExpression` along with multiple :class:`DisjunctiveLicense`, as this was an accepted in CycloneDX JSON before v1.5. So for modeling purposes, this is supported. Denormalizers/deserializers will be thankful. The normalization/serialization process SHOULD take care of these facts and do what is needed.