// Package hire 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 larkhire

import (
	"context"
)

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

func NewP2ApplicationDeletedV1Handler(handler func(context.Context, *P2ApplicationDeletedV1) error) *P2ApplicationDeletedV1Handler {
	h := &P2ApplicationDeletedV1Handler{handler: handler}
	return h
}

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

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

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

func NewP2ApplicationStageChangedV1Handler(handler func(context.Context, *P2ApplicationStageChangedV1) error) *P2ApplicationStageChangedV1Handler {
	h := &P2ApplicationStageChangedV1Handler{handler: handler}
	return h
}

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

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

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

func NewP2EcoAccountCreatedV1Handler(handler func(context.Context, *P2EcoAccountCreatedV1) error) *P2EcoAccountCreatedV1Handler {
	h := &P2EcoAccountCreatedV1Handler{handler: handler}
	return h
}

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

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

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

func NewP2EcoBackgroundCheckCanceledV1Handler(handler func(context.Context, *P2EcoBackgroundCheckCanceledV1) error) *P2EcoBackgroundCheckCanceledV1Handler {
	h := &P2EcoBackgroundCheckCanceledV1Handler{handler: handler}
	return h
}

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

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

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

func NewP2EcoBackgroundCheckCreatedV1Handler(handler func(context.Context, *P2EcoBackgroundCheckCreatedV1) error) *P2EcoBackgroundCheckCreatedV1Handler {
	h := &P2EcoBackgroundCheckCreatedV1Handler{handler: handler}
	return h
}

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

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

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

func NewP2EcoExamCreatedV1Handler(handler func(context.Context, *P2EcoExamCreatedV1) error) *P2EcoExamCreatedV1Handler {
	h := &P2EcoExamCreatedV1Handler{handler: handler}
	return h
}

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

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

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

func NewP2EhrImportTaskImportedV1Handler(handler func(context.Context, *P2EhrImportTaskImportedV1) error) *P2EhrImportTaskImportedV1Handler {
	h := &P2EhrImportTaskImportedV1Handler{handler: handler}
	return h
}

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

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

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

func NewP2EhrImportTaskForInternshipOfferImportedV1Handler(handler func(context.Context, *P2EhrImportTaskForInternshipOfferImportedV1) error) *P2EhrImportTaskForInternshipOfferImportedV1Handler {
	h := &P2EhrImportTaskForInternshipOfferImportedV1Handler{handler: handler}
	return h
}

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

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

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

func NewP2OfferStatusChangedV1Handler(handler func(context.Context, *P2OfferStatusChangedV1) error) *P2OfferStatusChangedV1Handler {
	h := &P2OfferStatusChangedV1Handler{handler: handler}
	return h
}

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

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

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

func NewP2ReferralAccountAssetsUpdateV1Handler(handler func(context.Context, *P2ReferralAccountAssetsUpdateV1) error) *P2ReferralAccountAssetsUpdateV1Handler {
	h := &P2ReferralAccountAssetsUpdateV1Handler{handler: handler}
	return h
}

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

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

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

func NewP2TalentDeletedV1Handler(handler func(context.Context, *P2TalentDeletedV1) error) *P2TalentDeletedV1Handler {
	h := &P2TalentDeletedV1Handler{handler: handler}
	return h
}

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

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

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

func NewP2TalentTagSubscriptionV1Handler(handler func(context.Context, *P2TalentTagSubscriptionV1) error) *P2TalentTagSubscriptionV1Handler {
	h := &P2TalentTagSubscriptionV1Handler{handler: handler}
	return h
}

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

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