// Code generated by protoc-gen-grpc-mock. DO NOT EDIT.
// source: automate-gateway/api/notifications/notifications.proto

package notifications

import (
	"context"

	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
)

// verify that the mock satisfies the NotificationsServer interface (at compile time)
var _ NotificationsServer = &NotificationsServerMock{}

// NewNotificationsServerMock gives you a fresh instance of NotificationsServerMock.
func NewNotificationsServerMock() *NotificationsServerMock {
	return &NotificationsServerMock{validateRequests: true}
}

// NewNotificationsServerMockWithoutValidation gives you a fresh instance of
// NotificationsServerMock which does not attempt to validate requests before passing
// them to their respective '*Func'.
func NewNotificationsServerMockWithoutValidation() *NotificationsServerMock {
	return &NotificationsServerMock{}
}

// NotificationsServerMock is the mock-what-you-want struct that stubs all not-overridden
// methods with "not implemented" returns
type NotificationsServerMock struct {
	validateRequests    bool
	AddRuleFunc         func(context.Context, *RuleAddRequest) (*RuleAddResponse, error)
	DeleteRuleFunc      func(context.Context, *RuleIdentifier) (*RuleDeleteResponse, error)
	UpdateRuleFunc      func(context.Context, *RuleUpdateRequest) (*RuleUpdateResponse, error)
	GetRuleFunc         func(context.Context, *RuleIdentifier) (*RuleGetResponse, error)
	ListRulesFunc       func(context.Context, *RuleListRequest) (*RuleListResponse, error)
	ValidateWebhookFunc func(context.Context, *URLValidationRequest) (*URLValidationResponse, error)
	VersionFunc         func(context.Context, *VersionRequest) (*VersionResponse, error)
}

func (m *NotificationsServerMock) AddRule(ctx context.Context, req *RuleAddRequest) (*RuleAddResponse, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.AddRuleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'AddRule' not implemented")
}

func (m *NotificationsServerMock) DeleteRule(ctx context.Context, req *RuleIdentifier) (*RuleDeleteResponse, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.DeleteRuleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'DeleteRule' not implemented")
}

func (m *NotificationsServerMock) UpdateRule(ctx context.Context, req *RuleUpdateRequest) (*RuleUpdateResponse, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.UpdateRuleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'UpdateRule' not implemented")
}

func (m *NotificationsServerMock) GetRule(ctx context.Context, req *RuleIdentifier) (*RuleGetResponse, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.GetRuleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'GetRule' not implemented")
}

func (m *NotificationsServerMock) ListRules(ctx context.Context, req *RuleListRequest) (*RuleListResponse, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.ListRulesFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ListRules' not implemented")
}

func (m *NotificationsServerMock) ValidateWebhook(ctx context.Context, req *URLValidationRequest) (*URLValidationResponse, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.ValidateWebhookFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ValidateWebhook' not implemented")
}

func (m *NotificationsServerMock) Version(ctx context.Context, req *VersionRequest) (*VersionResponse, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.VersionFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'Version' not implemented")
}

// Reset resets all overridden functions
func (m *NotificationsServerMock) Reset() {
	m.AddRuleFunc = nil
	m.DeleteRuleFunc = nil
	m.UpdateRuleFunc = nil
	m.GetRuleFunc = nil
	m.ListRulesFunc = nil
	m.ValidateWebhookFunc = nil
	m.VersionFunc = nil
}
