cyclonedx.model.data ==================== .. py:module:: cyclonedx.model.data .. autoapi-nested-parse:: This set of classes represents the component data types in the CycloneDX standard. .. note:: Introduced in CycloneDX v1.5. .. note:: See the CycloneDX Schema for component data: - XML: https://cyclonedx.org/docs/1.7/xml/#type_componentDataType - JSON: https://cyclonedx.org/docs/1.7/json/#components_items_data Classes ------- .. autoapisummary:: cyclonedx.model.data.ComponentDataKind cyclonedx.model.data.DataContents cyclonedx.model.data.DataGovernanceResponsibleParty cyclonedx.model.data.DataGovernance cyclonedx.model.data.ComponentData cyclonedx.model.data.DatasetReference Module Contents --------------- .. py:class:: ComponentDataKind Bases: :py:obj:`str`, :py:obj:`enum.Enum` Enumeration for `componentDataTypeEnumeration`: the type of data. .. py:attribute:: SOURCE_CODE :value: 'source-code' .. py:attribute:: CONFIGURATION :value: 'configuration' .. py:attribute:: DATASET :value: 'dataset' .. py:attribute:: DEFINITION :value: 'definition' .. py:attribute:: OTHER :value: 'other' .. py:class:: DataContents(*, attachment: Optional[cyclonedx.model.AttachedText] = None, url: Optional[cyclonedx.model.XsUri] = None, properties: Optional[collections.abc.Iterable[cyclonedx.model.Property]] = None) Contents or references to the contents of the data being described. .. py:property:: attachment :type: Optional[cyclonedx.model.AttachedText] An optional way to include textual or encoded data. Returns: `AttachedText` if set else `None` .. py:property:: url :type: Optional[cyclonedx.model.XsUri] The URL to where the data can be retrieved. Returns: `XsUri` if set else `None` .. py:property:: properties :type: SortedSet[Property] Provides the ability to document properties in a name-value store. Returns: Set of `Property` .. py:class:: DataGovernanceResponsibleParty(*, organization: Optional[cyclonedx.model.contact.OrganizationalEntity] = None, contact: Optional[cyclonedx.model.contact.OrganizationalContact] = None) A party that is responsible for data: either an organization or an individual. Exactly one of `organization` and `contact` MUST be supplied, as required by the JSON schema. .. py:property:: organization :type: Optional[cyclonedx.model.contact.OrganizationalEntity] The organization that is responsible for the data. Returns: `OrganizationalEntity` if set else `None` .. py:property:: contact :type: Optional[cyclonedx.model.contact.OrganizationalContact] The individual that is responsible for the data. Returns: `OrganizationalContact` if set else `None` .. py:class:: DataGovernance(*, custodians: Optional[collections.abc.Iterable[DataGovernanceResponsibleParty]] = None, stewards: Optional[collections.abc.Iterable[DataGovernanceResponsibleParty]] = None, owners: Optional[collections.abc.Iterable[DataGovernanceResponsibleParty]] = None) Governance of the data: its custodians, stewards and owners. .. py:property:: custodians :type: SortedSet[DataGovernanceResponsibleParty] Data custodians are responsible for the safe custody, transport, and storage of data. Returns: Set of `DataGovernanceResponsibleParty` .. py:property:: stewards :type: SortedSet[DataGovernanceResponsibleParty] Data stewards are responsible for data content, context, and associated business rules. Returns: Set of `DataGovernanceResponsibleParty` .. py:property:: owners :type: SortedSet[DataGovernanceResponsibleParty] Data owners are concerned with risk and appropriate access to data. Returns: Set of `DataGovernanceResponsibleParty` .. py:class:: ComponentData(*, type: ComponentDataKind, bom_ref: Optional[Union[str, cyclonedx.model.bom_ref.BomRef]] = None, name: Optional[str] = None, contents: Optional[DataContents] = None, classification: Optional[str] = None, sensitive_data: Optional[collections.abc.Iterable[str]] = None, graphics: Optional[cyclonedx.model.graphics.GraphicsCollection] = None, description: Optional[str] = None, governance: Optional[DataGovernance] = None) Inline data of a component, as defined by `componentDataType`: a dataset, source code, configuration, etc. .. py:property:: type :type: ComponentDataKind The general theme or subject matter of the data being specified. Returns: `ComponentDataKind` .. py:property:: name :type: Optional[str] The name of the dataset. Returns: `str` if set else `None` .. py:property:: contents :type: Optional[DataContents] The contents or references to the contents of the data being described. Returns: `DataContents` if set else `None` .. py:property:: classification :type: Optional[str] Data classification tags data according to its type, sensitivity, and value if altered, stolen, or destroyed. Returns: `str` if set else `None` .. py:property:: sensitive_data :type: SortedSet[str] A description of any sensitive data in a dataset. Returns: Set of `str` .. py:property:: graphics :type: Optional[cyclonedx.model.graphics.GraphicsCollection] A collection of graphics that represent various measurements. Returns: `GraphicsCollection` if set else `None` .. py:property:: description :type: Optional[str] A description of the dataset. Can describe size of dataset, whether it's downloadable, etc. Returns: `str` if set else `None` .. py:property:: governance :type: Optional[DataGovernance] Data governance captures information regarding data ownership, stewardship, and custodianship. Returns: `DataGovernance` if set else `None` .. py:property:: bom_ref :type: cyclonedx.model.bom_ref.BomRef An identifier which can be used to reference the data elsewhere in the BOM. Every `bom-ref` must be unique within the BOM. Returns: `BomRef` .. py:class:: DatasetReference(*, ref: Union[str, cyclonedx.model.bom_ref.BomRef, cyclonedx.model.XsUri]) A reference to a data component, as used by `modelCard.modelParameters.datasets`. The reference is either the `bom-ref` of a data component in the same BOM, or a BOM-Link (`urn:cdx:...`) to an element of another BOM. .. note:: Serialization is handled by :attr:`cyclonedx.model.model_card.ModelParameters.datasets`. .. py:property:: ref :type: Union[str, cyclonedx.model.bom_ref.BomRef, cyclonedx.model.XsUri] The `bom-ref` of a data component, or a BOM-Link to one. Returns: `str`, `BomRef` or `XsUri`