// Code generated by pegomock. DO NOT EDIT.
// Source: github.com/runatlantis/atlantis/server/events/webhooks (interfaces: UnderlyingSlackClient)

package mocks

import (
	pegomock "github.com/petergtz/pegomock/v4"
	slack "github.com/slack-go/slack"
	"reflect"
	"time"
)

type MockUnderlyingSlackClient struct {
	fail func(message string, callerSkip ...int)
}

func NewMockUnderlyingSlackClient(options ...pegomock.Option) *MockUnderlyingSlackClient {
	mock := &MockUnderlyingSlackClient{}
	for _, option := range options {
		option.Apply(mock)
	}
	return mock
}

func (mock *MockUnderlyingSlackClient) SetFailHandler(fh pegomock.FailHandler) { mock.fail = fh }
func (mock *MockUnderlyingSlackClient) FailHandler() pegomock.FailHandler      { return mock.fail }

func (mock *MockUnderlyingSlackClient) AuthTest() (*slack.AuthTestResponse, error) {
	if mock == nil {
		panic("mock must not be nil. Use myMock := NewMockUnderlyingSlackClient().")
	}
	_params := []pegomock.Param{}
	_result := pegomock.GetGenericMockFrom(mock).Invoke("AuthTest", _params, []reflect.Type{reflect.TypeOf((**slack.AuthTestResponse)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
	var _ret0 *slack.AuthTestResponse
	var _ret1 error
	if len(_result) != 0 {
		if _result[0] != nil {
			_ret0 = _result[0].(*slack.AuthTestResponse)
		}
		if _result[1] != nil {
			_ret1 = _result[1].(error)
		}
	}
	return _ret0, _ret1
}

func (mock *MockUnderlyingSlackClient) GetConversations(conversationParams *slack.GetConversationsParameters) ([]slack.Channel, string, error) {
	if mock == nil {
		panic("mock must not be nil. Use myMock := NewMockUnderlyingSlackClient().")
	}
	_params := []pegomock.Param{conversationParams}
	_result := pegomock.GetGenericMockFrom(mock).Invoke("GetConversations", _params, []reflect.Type{reflect.TypeOf((*[]slack.Channel)(nil)).Elem(), reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
	var _ret0 []slack.Channel
	var _ret1 string
	var _ret2 error
	if len(_result) != 0 {
		if _result[0] != nil {
			_ret0 = _result[0].([]slack.Channel)
		}
		if _result[1] != nil {
			_ret1 = _result[1].(string)
		}
		if _result[2] != nil {
			_ret2 = _result[2].(error)
		}
	}
	return _ret0, _ret1, _ret2
}

func (mock *MockUnderlyingSlackClient) PostMessage(channelID string, options ...slack.MsgOption) (string, string, error) {
	if mock == nil {
		panic("mock must not be nil. Use myMock := NewMockUnderlyingSlackClient().")
	}
	_params := []pegomock.Param{channelID}
	for _, param := range options {
		_params = append(_params, param)
	}
	_result := pegomock.GetGenericMockFrom(mock).Invoke("PostMessage", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
	var _ret0 string
	var _ret1 string
	var _ret2 error
	if len(_result) != 0 {
		if _result[0] != nil {
			_ret0 = _result[0].(string)
		}
		if _result[1] != nil {
			_ret1 = _result[1].(string)
		}
		if _result[2] != nil {
			_ret2 = _result[2].(error)
		}
	}
	return _ret0, _ret1, _ret2
}

func (mock *MockUnderlyingSlackClient) VerifyWasCalledOnce() *VerifierMockUnderlyingSlackClient {
	return &VerifierMockUnderlyingSlackClient{
		mock:                   mock,
		invocationCountMatcher: pegomock.Times(1),
	}
}

func (mock *MockUnderlyingSlackClient) VerifyWasCalled(invocationCountMatcher pegomock.InvocationCountMatcher) *VerifierMockUnderlyingSlackClient {
	return &VerifierMockUnderlyingSlackClient{
		mock:                   mock,
		invocationCountMatcher: invocationCountMatcher,
	}
}

func (mock *MockUnderlyingSlackClient) VerifyWasCalledInOrder(invocationCountMatcher pegomock.InvocationCountMatcher, inOrderContext *pegomock.InOrderContext) *VerifierMockUnderlyingSlackClient {
	return &VerifierMockUnderlyingSlackClient{
		mock:                   mock,
		invocationCountMatcher: invocationCountMatcher,
		inOrderContext:         inOrderContext,
	}
}

func (mock *MockUnderlyingSlackClient) VerifyWasCalledEventually(invocationCountMatcher pegomock.InvocationCountMatcher, timeout time.Duration) *VerifierMockUnderlyingSlackClient {
	return &VerifierMockUnderlyingSlackClient{
		mock:                   mock,
		invocationCountMatcher: invocationCountMatcher,
		timeout:                timeout,
	}
}

type VerifierMockUnderlyingSlackClient struct {
	mock                   *MockUnderlyingSlackClient
	invocationCountMatcher pegomock.InvocationCountMatcher
	inOrderContext         *pegomock.InOrderContext
	timeout                time.Duration
}

func (verifier *VerifierMockUnderlyingSlackClient) AuthTest() *MockUnderlyingSlackClient_AuthTest_OngoingVerification {
	_params := []pegomock.Param{}
	methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "AuthTest", _params, verifier.timeout)
	return &MockUnderlyingSlackClient_AuthTest_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
}

type MockUnderlyingSlackClient_AuthTest_OngoingVerification struct {
	mock              *MockUnderlyingSlackClient
	methodInvocations []pegomock.MethodInvocation
}

func (c *MockUnderlyingSlackClient_AuthTest_OngoingVerification) GetCapturedArguments() {
}

func (c *MockUnderlyingSlackClient_AuthTest_OngoingVerification) GetAllCapturedArguments() {
}

func (verifier *VerifierMockUnderlyingSlackClient) GetConversations(conversationParams *slack.GetConversationsParameters) *MockUnderlyingSlackClient_GetConversations_OngoingVerification {
	_params := []pegomock.Param{conversationParams}
	methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetConversations", _params, verifier.timeout)
	return &MockUnderlyingSlackClient_GetConversations_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
}

type MockUnderlyingSlackClient_GetConversations_OngoingVerification struct {
	mock              *MockUnderlyingSlackClient
	methodInvocations []pegomock.MethodInvocation
}

func (c *MockUnderlyingSlackClient_GetConversations_OngoingVerification) GetCapturedArguments() *slack.GetConversationsParameters {
	conversationParams := c.GetAllCapturedArguments()
	return conversationParams[len(conversationParams)-1]
}

func (c *MockUnderlyingSlackClient_GetConversations_OngoingVerification) GetAllCapturedArguments() (_param0 []*slack.GetConversationsParameters) {
	_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
	if len(_params) > 0 {
		if len(_params) > 0 {
			_param0 = make([]*slack.GetConversationsParameters, len(c.methodInvocations))
			for u, param := range _params[0] {
				_param0[u] = param.(*slack.GetConversationsParameters)
			}
		}
	}
	return
}

func (verifier *VerifierMockUnderlyingSlackClient) PostMessage(channelID string, options ...slack.MsgOption) *MockUnderlyingSlackClient_PostMessage_OngoingVerification {
	_params := []pegomock.Param{channelID}
	for _, param := range options {
		_params = append(_params, param)
	}
	methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "PostMessage", _params, verifier.timeout)
	return &MockUnderlyingSlackClient_PostMessage_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
}

type MockUnderlyingSlackClient_PostMessage_OngoingVerification struct {
	mock              *MockUnderlyingSlackClient
	methodInvocations []pegomock.MethodInvocation
}

func (c *MockUnderlyingSlackClient_PostMessage_OngoingVerification) GetCapturedArguments() (string, []slack.MsgOption) {
	channelID, options := c.GetAllCapturedArguments()
	return channelID[len(channelID)-1], options[len(options)-1]
}

func (c *MockUnderlyingSlackClient_PostMessage_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 [][]slack.MsgOption) {
	_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
	if len(_params) > 0 {
		if len(_params) > 0 {
			_param0 = make([]string, len(c.methodInvocations))
			for u, param := range _params[0] {
				_param0[u] = param.(string)
			}
		}
		_param1 = make([][]slack.MsgOption, len(c.methodInvocations))
		for u := 0; u < len(c.methodInvocations); u++ {
			_param1[u] = make([]slack.MsgOption, len(_params)-1)
			for x := 1; x < len(_params); x++ {
				if _params[x][u] != nil {
					_param1[u][x-1] = _params[x][u].(slack.MsgOption)
				}
			}
		}
	}
	return
}
