def from_obj(cls, obj, return_obj=None): if not obj: return None if not return_obj: return_obj = cls() if obj.get_TTP(): return_obj.ttps = [TTP.from_obj(x) for x in obj.get_TTP()] return return_obj
def from_obj(cls, obj, return_obj=None): if not obj: return None if not return_obj: return_obj = cls() return_obj.kill_chains = KillChains.from_obj(obj.get_Kill_Chains()) if obj.get_TTP(): return_obj.ttps = [TTP.from_obj(x) for x in obj.get_TTP()] return return_obj