2020-03-22 03:22:36 +01:00
|
|
|
"""Base classes for STIX 2.1 type definitions."""
|
|
|
|
|
2020-03-27 07:40:42 +01:00
|
|
|
from ..base import (
|
|
|
|
_DomainObject, _Extension, _Observable, _RelationshipObject, _STIXBase,
|
|
|
|
)
|
2020-03-22 03:22:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
class _STIXBase21(_STIXBase):
|
2020-10-20 04:18:45 +02:00
|
|
|
|
|
|
|
def __init__(self, **kwargs):
|
|
|
|
if 'extensions' in self._properties:
|
|
|
|
self._properties['extensions'].allow_custom = kwargs.get('allow_custom', False)
|
|
|
|
super(_STIXBase21, self).__init__(**kwargs)
|
2020-03-22 03:22:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
class _Observable(_Observable, _STIXBase21):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class _Extension(_Extension, _STIXBase21):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2020-03-27 07:40:42 +01:00
|
|
|
class _DomainObject(_DomainObject, _STIXBase21):
|
2020-03-22 03:22:36 +01:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2020-03-27 07:40:42 +01:00
|
|
|
class _RelationshipObject(_RelationshipObject, _STIXBase21):
|
2020-03-22 03:22:36 +01:00
|
|
|
pass
|