// Package contact code generated by oapi sdk gen
/*
 * MIT License
 *
 * Copyright (c) 2022 Lark Technologies Pte. Ltd.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package larkcontact

import (
	"context"
)

// 消息处理器定义
type P2CustomAttrEventUpdatedV3Handler struct {
	handler func(context.Context, *P2CustomAttrEventUpdatedV3) error
}

func NewP2CustomAttrEventUpdatedV3Handler(handler func(context.Context, *P2CustomAttrEventUpdatedV3) error) *P2CustomAttrEventUpdatedV3Handler {
	h := &P2CustomAttrEventUpdatedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2CustomAttrEventUpdatedV3Handler) Event() interface{} {
	return &P2CustomAttrEventUpdatedV3{}
}

// 回调开发者注册的handle
func (h *P2CustomAttrEventUpdatedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2CustomAttrEventUpdatedV3))
}

// 消息处理器定义
type P2DepartmentCreatedV3Handler struct {
	handler func(context.Context, *P2DepartmentCreatedV3) error
}

func NewP2DepartmentCreatedV3Handler(handler func(context.Context, *P2DepartmentCreatedV3) error) *P2DepartmentCreatedV3Handler {
	h := &P2DepartmentCreatedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2DepartmentCreatedV3Handler) Event() interface{} {
	return &P2DepartmentCreatedV3{}
}

// 回调开发者注册的handle
func (h *P2DepartmentCreatedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2DepartmentCreatedV3))
}

// 消息处理器定义
type P2DepartmentDeletedV3Handler struct {
	handler func(context.Context, *P2DepartmentDeletedV3) error
}

func NewP2DepartmentDeletedV3Handler(handler func(context.Context, *P2DepartmentDeletedV3) error) *P2DepartmentDeletedV3Handler {
	h := &P2DepartmentDeletedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2DepartmentDeletedV3Handler) Event() interface{} {
	return &P2DepartmentDeletedV3{}
}

// 回调开发者注册的handle
func (h *P2DepartmentDeletedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2DepartmentDeletedV3))
}

// 消息处理器定义
type P2DepartmentUpdatedV3Handler struct {
	handler func(context.Context, *P2DepartmentUpdatedV3) error
}

func NewP2DepartmentUpdatedV3Handler(handler func(context.Context, *P2DepartmentUpdatedV3) error) *P2DepartmentUpdatedV3Handler {
	h := &P2DepartmentUpdatedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2DepartmentUpdatedV3Handler) Event() interface{} {
	return &P2DepartmentUpdatedV3{}
}

// 回调开发者注册的handle
func (h *P2DepartmentUpdatedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2DepartmentUpdatedV3))
}

// 消息处理器定义
type P2EmployeeTypeEnumActivedV3Handler struct {
	handler func(context.Context, *P2EmployeeTypeEnumActivedV3) error
}

func NewP2EmployeeTypeEnumActivedV3Handler(handler func(context.Context, *P2EmployeeTypeEnumActivedV3) error) *P2EmployeeTypeEnumActivedV3Handler {
	h := &P2EmployeeTypeEnumActivedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2EmployeeTypeEnumActivedV3Handler) Event() interface{} {
	return &P2EmployeeTypeEnumActivedV3{}
}

// 回调开发者注册的handle
func (h *P2EmployeeTypeEnumActivedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2EmployeeTypeEnumActivedV3))
}

// 消息处理器定义
type P2EmployeeTypeEnumCreatedV3Handler struct {
	handler func(context.Context, *P2EmployeeTypeEnumCreatedV3) error
}

func NewP2EmployeeTypeEnumCreatedV3Handler(handler func(context.Context, *P2EmployeeTypeEnumCreatedV3) error) *P2EmployeeTypeEnumCreatedV3Handler {
	h := &P2EmployeeTypeEnumCreatedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2EmployeeTypeEnumCreatedV3Handler) Event() interface{} {
	return &P2EmployeeTypeEnumCreatedV3{}
}

// 回调开发者注册的handle
func (h *P2EmployeeTypeEnumCreatedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2EmployeeTypeEnumCreatedV3))
}

// 消息处理器定义
type P2EmployeeTypeEnumDeactivatedV3Handler struct {
	handler func(context.Context, *P2EmployeeTypeEnumDeactivatedV3) error
}

func NewP2EmployeeTypeEnumDeactivatedV3Handler(handler func(context.Context, *P2EmployeeTypeEnumDeactivatedV3) error) *P2EmployeeTypeEnumDeactivatedV3Handler {
	h := &P2EmployeeTypeEnumDeactivatedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2EmployeeTypeEnumDeactivatedV3Handler) Event() interface{} {
	return &P2EmployeeTypeEnumDeactivatedV3{}
}

// 回调开发者注册的handle
func (h *P2EmployeeTypeEnumDeactivatedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2EmployeeTypeEnumDeactivatedV3))
}

// 消息处理器定义
type P2EmployeeTypeEnumDeletedV3Handler struct {
	handler func(context.Context, *P2EmployeeTypeEnumDeletedV3) error
}

func NewP2EmployeeTypeEnumDeletedV3Handler(handler func(context.Context, *P2EmployeeTypeEnumDeletedV3) error) *P2EmployeeTypeEnumDeletedV3Handler {
	h := &P2EmployeeTypeEnumDeletedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2EmployeeTypeEnumDeletedV3Handler) Event() interface{} {
	return &P2EmployeeTypeEnumDeletedV3{}
}

// 回调开发者注册的handle
func (h *P2EmployeeTypeEnumDeletedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2EmployeeTypeEnumDeletedV3))
}

// 消息处理器定义
type P2EmployeeTypeEnumUpdatedV3Handler struct {
	handler func(context.Context, *P2EmployeeTypeEnumUpdatedV3) error
}

func NewP2EmployeeTypeEnumUpdatedV3Handler(handler func(context.Context, *P2EmployeeTypeEnumUpdatedV3) error) *P2EmployeeTypeEnumUpdatedV3Handler {
	h := &P2EmployeeTypeEnumUpdatedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2EmployeeTypeEnumUpdatedV3Handler) Event() interface{} {
	return &P2EmployeeTypeEnumUpdatedV3{}
}

// 回调开发者注册的handle
func (h *P2EmployeeTypeEnumUpdatedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2EmployeeTypeEnumUpdatedV3))
}

// 消息处理器定义
type P2ScopeUpdatedV3Handler struct {
	handler func(context.Context, *P2ScopeUpdatedV3) error
}

func NewP2ScopeUpdatedV3Handler(handler func(context.Context, *P2ScopeUpdatedV3) error) *P2ScopeUpdatedV3Handler {
	h := &P2ScopeUpdatedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2ScopeUpdatedV3Handler) Event() interface{} {
	return &P2ScopeUpdatedV3{}
}

// 回调开发者注册的handle
func (h *P2ScopeUpdatedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2ScopeUpdatedV3))
}

// 消息处理器定义
type P2UserCreatedV3Handler struct {
	handler func(context.Context, *P2UserCreatedV3) error
}

func NewP2UserCreatedV3Handler(handler func(context.Context, *P2UserCreatedV3) error) *P2UserCreatedV3Handler {
	h := &P2UserCreatedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2UserCreatedV3Handler) Event() interface{} {
	return &P2UserCreatedV3{}
}

// 回调开发者注册的handle
func (h *P2UserCreatedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2UserCreatedV3))
}

// 消息处理器定义
type P2UserDeletedV3Handler struct {
	handler func(context.Context, *P2UserDeletedV3) error
}

func NewP2UserDeletedV3Handler(handler func(context.Context, *P2UserDeletedV3) error) *P2UserDeletedV3Handler {
	h := &P2UserDeletedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2UserDeletedV3Handler) Event() interface{} {
	return &P2UserDeletedV3{}
}

// 回调开发者注册的handle
func (h *P2UserDeletedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2UserDeletedV3))
}

// 消息处理器定义
type P2UserUpdatedV3Handler struct {
	handler func(context.Context, *P2UserUpdatedV3) error
}

func NewP2UserUpdatedV3Handler(handler func(context.Context, *P2UserUpdatedV3) error) *P2UserUpdatedV3Handler {
	h := &P2UserUpdatedV3Handler{handler: handler}
	return h
}

// 返回事件的消息体的实例，用于反序列化用
func (h *P2UserUpdatedV3Handler) Event() interface{} {
	return &P2UserUpdatedV3{}
}

// 回调开发者注册的handle
func (h *P2UserUpdatedV3Handler) Handle(ctx context.Context, event interface{}) error {
	return h.handler(ctx, event.(*P2UserUpdatedV3))
}
