# Code generated by Lark OpenAPI. from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type from lark_oapi.event.processor import IEventProcessor from .model.p2_moments_comment_created_v1 import P2MomentsCommentCreatedV1 from .model.p2_moments_comment_deleted_v1 import P2MomentsCommentDeletedV1 from .model.p2_moments_post_created_v1 import P2MomentsPostCreatedV1 from .model.p2_moments_post_deleted_v1 import P2MomentsPostDeletedV1 from .model.p2_moments_post_statistics_updated_v1 import P2MomentsPostStatisticsUpdatedV1 from .model.p2_moments_reaction_created_v1 import P2MomentsReactionCreatedV1 from .model.p2_moments_reaction_deleted_v1 import P2MomentsReactionDeletedV1 class P2MomentsCommentCreatedV1Processor(IEventProcessor[P2MomentsCommentCreatedV1]): def __init__(self, f: Callable[[P2MomentsCommentCreatedV1], None]): self.f = f def type(self) -> Type[P2MomentsCommentCreatedV1]: return P2MomentsCommentCreatedV1 def do(self, data: P2MomentsCommentCreatedV1) -> None: self.f(data) class P2MomentsCommentDeletedV1Processor(IEventProcessor[P2MomentsCommentDeletedV1]): def __init__(self, f: Callable[[P2MomentsCommentDeletedV1], None]): self.f = f def type(self) -> Type[P2MomentsCommentDeletedV1]: return P2MomentsCommentDeletedV1 def do(self, data: P2MomentsCommentDeletedV1) -> None: self.f(data) class P2MomentsPostCreatedV1Processor(IEventProcessor[P2MomentsPostCreatedV1]): def __init__(self, f: Callable[[P2MomentsPostCreatedV1], None]): self.f = f def type(self) -> Type[P2MomentsPostCreatedV1]: return P2MomentsPostCreatedV1 def do(self, data: P2MomentsPostCreatedV1) -> None: self.f(data) class P2MomentsPostDeletedV1Processor(IEventProcessor[P2MomentsPostDeletedV1]): def __init__(self, f: Callable[[P2MomentsPostDeletedV1], None]): self.f = f def type(self) -> Type[P2MomentsPostDeletedV1]: return P2MomentsPostDeletedV1 def do(self, data: P2MomentsPostDeletedV1) -> None: self.f(data) class P2MomentsPostStatisticsUpdatedV1Processor(IEventProcessor[P2MomentsPostStatisticsUpdatedV1]): def __init__(self, f: Callable[[P2MomentsPostStatisticsUpdatedV1], None]): self.f = f def type(self) -> Type[P2MomentsPostStatisticsUpdatedV1]: return P2MomentsPostStatisticsUpdatedV1 def do(self, data: P2MomentsPostStatisticsUpdatedV1) -> None: self.f(data) class P2MomentsReactionCreatedV1Processor(IEventProcessor[P2MomentsReactionCreatedV1]): def __init__(self, f: Callable[[P2MomentsReactionCreatedV1], None]): self.f = f def type(self) -> Type[P2MomentsReactionCreatedV1]: return P2MomentsReactionCreatedV1 def do(self, data: P2MomentsReactionCreatedV1) -> None: self.f(data) class P2MomentsReactionDeletedV1Processor(IEventProcessor[P2MomentsReactionDeletedV1]): def __init__(self, f: Callable[[P2MomentsReactionDeletedV1], None]): self.f = f def type(self) -> Type[P2MomentsReactionDeletedV1]: return P2MomentsReactionDeletedV1 def do(self, data: P2MomentsReactionDeletedV1) -> None: self.f(data)