[docs]classVaultAttachment(BaseModel):"""Model representing a vault attachment. This model is used to represent the metadata and content of a file stored in the SOAR vault. It includes attributes such as vault ID, file name, size, metadata, and the file path. """id:intcreated_via:str|None=Nonecontainer:strtask:str|None=Nonecreate_time:strname:struser:strvault_document:intmime_type:str|None=Nonees_attachment_id:str|None=Nonehash:strvault_id:strsize:intpath:strmetadata:dict={}aka:list[str]=[]container_id:intcontains:list[str]=[]
[docs]defopen(self,mode:str="r")->IO[str]|IO[bytes]:"""Open the vault attachment file. Args: mode (str): The mode in which to open the file. Defaults to 'r'. Returns: file: A file-like object for reading the attachment content. """returnopen(self.path,mode)