// Code generated by mockery v1.0.0. DO NOT EDIT.

package mocks

import (
	queue "github.com/33cn/chain33/queue"
	mock "github.com/stretchr/testify/mock"

	time "time"

	types "github.com/33cn/chain33/types"
)

// Client is an autogenerated mock type for the Client type
type Client struct {
	mock.Mock
}

// Close provides a mock function with given fields:
func (_m *Client) Close() {
	_m.Called()
}

// CloseQueue provides a mock function with given fields:
func (_m *Client) CloseQueue() (*types.Reply, error) {
	ret := _m.Called()

	var r0 *types.Reply
	if rf, ok := ret.Get(0).(func() *types.Reply); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*types.Reply)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// FreeMessage provides a mock function with given fields: msg
func (_m *Client) FreeMessage(msg ...*queue.Message) {
	_va := make([]interface{}, len(msg))
	for _i := range msg {
		_va[_i] = msg[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, _va...)
	_m.Called(_ca...)
}

// GetConfig provides a mock function with given fields:
func (_m *Client) GetConfig() *types.Chain33Config {
	ret := _m.Called()

	var r0 *types.Chain33Config
	if rf, ok := ret.Get(0).(func() *types.Chain33Config); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*types.Chain33Config)
		}
	}

	return r0
}

// NewMessage provides a mock function with given fields: topic, ty, data
func (_m *Client) NewMessage(topic string, ty int64, data interface{}) *queue.Message {
	ret := _m.Called(topic, ty, data)

	var r0 *queue.Message
	if rf, ok := ret.Get(0).(func(string, int64, interface{}) *queue.Message); ok {
		r0 = rf(topic, ty, data)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*queue.Message)
		}
	}

	return r0
}

// Recv provides a mock function with given fields:
func (_m *Client) Recv() chan *queue.Message {
	ret := _m.Called()

	var r0 chan *queue.Message
	if rf, ok := ret.Get(0).(func() chan *queue.Message); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(chan *queue.Message)
		}
	}

	return r0
}

// Reply provides a mock function with given fields: msg
func (_m *Client) Reply(msg *queue.Message) {
	_m.Called(msg)
}

// Send provides a mock function with given fields: msg, waitReply
func (_m *Client) Send(msg *queue.Message, waitReply bool) error {
	ret := _m.Called(msg, waitReply)

	var r0 error
	if rf, ok := ret.Get(0).(func(*queue.Message, bool) error); ok {
		r0 = rf(msg, waitReply)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// SendTimeout provides a mock function with given fields: msg, waitReply, timeout
func (_m *Client) SendTimeout(msg *queue.Message, waitReply bool, timeout time.Duration) error {
	ret := _m.Called(msg, waitReply, timeout)

	var r0 error
	if rf, ok := ret.Get(0).(func(*queue.Message, bool, time.Duration) error); ok {
		r0 = rf(msg, waitReply, timeout)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Sub provides a mock function with given fields: topic
func (_m *Client) Sub(topic string) {
	_m.Called(topic)
}

// Wait provides a mock function with given fields: msg
func (_m *Client) Wait(msg *queue.Message) (*queue.Message, error) {
	ret := _m.Called(msg)

	var r0 *queue.Message
	if rf, ok := ret.Get(0).(func(*queue.Message) *queue.Message); ok {
		r0 = rf(msg)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*queue.Message)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(*queue.Message) error); ok {
		r1 = rf(msg)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// WaitTimeout provides a mock function with given fields: msg, timeout
func (_m *Client) WaitTimeout(msg *queue.Message, timeout time.Duration) (*queue.Message, error) {
	ret := _m.Called(msg, timeout)

	var r0 *queue.Message
	if rf, ok := ret.Get(0).(func(*queue.Message, time.Duration) *queue.Message); ok {
		r0 = rf(msg, timeout)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*queue.Message)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(*queue.Message, time.Duration) error); ok {
		r1 = rf(msg, timeout)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
