# 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_drive_file_bitable_field_changed_v1 import P2DriveFileBitableFieldChangedV1
from .model.p2_drive_file_bitable_record_changed_v1 import P2DriveFileBitableRecordChangedV1
from .model.p2_drive_file_created_in_folder_v1 import P2DriveFileCreatedInFolderV1
from .model.p2_drive_file_deleted_v1 import P2DriveFileDeletedV1
from .model.p2_drive_file_edit_v1 import P2DriveFileEditV1
from .model.p2_drive_file_permission_member_added_v1 import P2DriveFilePermissionMemberAddedV1
from .model.p2_drive_file_permission_member_applied_v1 import P2DriveFilePermissionMemberAppliedV1
from .model.p2_drive_file_permission_member_removed_v1 import P2DriveFilePermissionMemberRemovedV1
from .model.p2_drive_file_read_v1 import P2DriveFileReadV1
from .model.p2_drive_file_title_updated_v1 import P2DriveFileTitleUpdatedV1
from .model.p2_drive_file_trashed_v1 import P2DriveFileTrashedV1


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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