# 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_security_and_compliance_device_apply_record_device_apply_event_v2 import \
    P2SecurityAndComplianceDeviceApplyRecordDeviceApplyEventV2
from .model.p2_security_and_compliance_device_record_device_change_event_v2 import \
    P2SecurityAndComplianceDeviceRecordDeviceChangeEventV2


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

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

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


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

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

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