2022-11-10 14:56:25 +00:00
|
|
|
from dataclasses import dataclass
|
2022-11-30 08:26:38 +00:00
|
|
|
from typing import Optional
|
2022-11-10 14:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
2022-11-25 12:44:47 +00:00
|
|
|
class ObjectRef:
|
|
|
|
cid: str
|
|
|
|
oid: str
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class LockObjectInfo(ObjectRef):
|
2022-11-30 08:26:38 +00:00
|
|
|
lifetime: Optional[int] = None
|
|
|
|
expire_at: Optional[int] = None
|
2022-11-25 12:44:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class StorageObjectInfo(ObjectRef):
|
2022-11-30 08:26:38 +00:00
|
|
|
size: Optional[int] = None
|
|
|
|
wallet_file_path: Optional[str] = None
|
|
|
|
file_path: Optional[str] = None
|
|
|
|
file_hash: Optional[str] = None
|
|
|
|
attributes: Optional[list[dict[str, str]]] = None
|
|
|
|
tombstone: Optional[str] = None
|
|
|
|
locks: Optional[list[LockObjectInfo]] = None
|