def _create_from_draft(
     self, obj: types.ChannelDraft, id: typing.Optional[str] = None
 ) -> types.Channel:
     object_id = str(uuid.UUID(id) if id is not None else uuid.uuid4())
     return types.Channel(
         id=str(object_id),
         version=1,
         name=obj.name,
         description=obj.description,
         roles=obj.roles,
         key=obj.key,
         created_at=datetime.datetime.now(),
         last_modified_at=datetime.datetime.now(),
         custom=utils.create_from_draft(obj.custom),
     )
 def post_load(self, data, **kwargs):
     return types.Channel(**data)
 def post_load(self, data):
     return types.Channel(**data)