DataVersion#

class ansys.sam.sysml2.dto.commit.data_version.DataVersion#

Data payload for a single element version in a commit.

Overview#

identify

Set the identity with the given element ID of the data version.

add_change

Add the change into the data version. Also serialize the data if it’s needed.

to_json

Serialize the data into a JSON dict.

Import detail#

from ansys.sam.sysml2.dto.commit.data_version import DataVersion

Attribute detail#

DataVersion.payload: dict#
DataVersion.identity: str = None#

Method detail#

DataVersion.identify(element_id: str)#

Set the identity with the given element ID of the data version.

DataVersion.add_change(key: str, value: Any)#

Add the change into the data version. Also serialize the data if it’s needed.

Parameters:
key: str

Key of the change.

value: Any

Value of the change.

DataVersion.to_json() dict#

Serialize the data into a JSON dict.