from __future__ import annotations
from dataclasses import dataclass, field

@dataclass
class PayloadData:
    args: list = field(default_factory=list)
    kwargs: dict = field(default_factory=dict)
    
    def unpack(self):
        if(len(self.args) == 1 and not self.kwargs):
            return self.args[0]
        else:
            return tuple(self.args, self.kwargs)
    
