# Code generated by Lark OpenAPI.

from typing import Callable, Type

from lark_oapi.event.processor import IEventProcessor
from .model.p2_corehr_probation_updated_v2 import P2CorehrProbationUpdatedV2


class P2CorehrProbationUpdatedV2Processor(IEventProcessor[P2CorehrProbationUpdatedV2]):
    def __init__(self, f: Callable[[P2CorehrProbationUpdatedV2], None]):
        self.f = f

    def type(self) -> Type[P2CorehrProbationUpdatedV2]:
        return P2CorehrProbationUpdatedV2

    def do(self, data: P2CorehrProbationUpdatedV2) -> None:
        self.f(data)
