[docs]classArtifact(BaseModel):"""Represents an artifact to be created during on_poll. This class allows users to create artifacts when yielding from an 'on poll' action. """model_config=ConfigDict(extra="forbid")name:str|None=Nonelabel:str|None=Nonedescription:str|None=Nonetype:str|None=Noneseverity:str|None=Nonesource_data_identifier:str|None=Nonecontainer_id:int|None=Nonedata:dict[str,Any]|None=Nonerun_automation:bool=Falseowner_id:int|str|None=Nonecef:dict[str,Any]|None=Nonecef_types:dict[str,list[str]]|None=Noneingest_app_id:int|str|None=Nonetags:list[str]|str|None=Nonestart_time:str|None=Noneend_time:str|None=Nonekill_chain:str|None=None
[docs]defto_dict(self)->dict[str,Any]:"""Convert the artifact to a dictionary (needed for save_artifact)."""returnself.model_dump(exclude_none=True)