def from_dict(cls, obj: dict) -> SamaTask:
        """Create an instance of SamaTask from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return SamaTask.parse_obj(obj)

        # raise errors for additional fields in the input
        for _key in obj.keys():
            if _key not in cls.__properties:
                raise ValueError("Error due to additional fields (not defined in SamaTask) in the input: " + str(obj))

        _obj = SamaTask.parse_obj({
            "priority": obj.get("priority"),
            "reserve_for": obj.get("reserve_for"),
            "data": SamaTaskData.from_dict(obj.get("data")) if obj.get("data") is not None else None
        })
        return _obj
Create an instance of SamaTask from a dict
lightly/openapi_generated/swagger_client/models/sama_task.py