Tag¶
-
class
trustar.models.tag.Tag(name, id=None, enclave_id=None)¶ Models a Tag.
Variables: - name – The name of the tag, i.e. “malicious”.
- id – The ID of the tag.
- enclave_id – The
Enclaveobject representing the enclave that the tag belongs to.
-
__init__(name, id=None, enclave_id=None)¶ Constructs a tag object.
Parameters: - name – The name of the tag, i.e. “malicious”.
- id – The ID of the tag.
- enclave_id – The ID of the enclave the tag belongs to.
-
classmethod
from_dict(tag)¶ Create a tag object from a dictionary. This method is intended for internal use, to construct a
Tagobject from the body of a response json. It expects the keys of the dictionary to match those of the json that would be found in a response to an API call such asGET /enclave-tags.Parameters: tag – The dictionary. Returns: The Tagobject.
-
to_dict(remove_nones=False)¶ Creates a dictionary representation of the tag.
Parameters: remove_nones – Whether Nonevalues should be filtered out of the dictionary. Defaults toFalse.Returns: A dictionary representation of the tag.