// Code generated by MockGen. DO NOT EDIT.
// Source: git.canopsis.net/canopsis/canopsis-community/community/go-engines-community/lib/api/websocket (interfaces: Upgrader,Connection,Authorizer,Hub)
//
// Generated by this command:
//
//	mockgen -destination=../../../mocks/lib/api/websocket/websocket.go git.canopsis.net/canopsis/canopsis-community/community/go-engines-community/lib/api/websocket Upgrader,Connection,Authorizer,Hub
//

// Package mock_websocket is a generated GoMock package.
package mock_websocket

import (
	context "context"
	net "net"
	http "net/http"
	reflect "reflect"
	time "time"

	websocket "git.canopsis.net/canopsis/canopsis-community/community/go-engines-community/lib/api/websocket"
	gomock "go.uber.org/mock/gomock"
)

// MockUpgrader is a mock of Upgrader interface.
type MockUpgrader struct {
	ctrl     *gomock.Controller
	recorder *MockUpgraderMockRecorder
	isgomock struct{}
}

// MockUpgraderMockRecorder is the mock recorder for MockUpgrader.
type MockUpgraderMockRecorder struct {
	mock *MockUpgrader
}

// NewMockUpgrader creates a new mock instance.
func NewMockUpgrader(ctrl *gomock.Controller) *MockUpgrader {
	mock := &MockUpgrader{ctrl: ctrl}
	mock.recorder = &MockUpgraderMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUpgrader) EXPECT() *MockUpgraderMockRecorder {
	return m.recorder
}

// Upgrade mocks base method.
func (m *MockUpgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (websocket.Connection, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Upgrade", w, r, responseHeader)
	ret0, _ := ret[0].(websocket.Connection)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Upgrade indicates an expected call of Upgrade.
func (mr *MockUpgraderMockRecorder) Upgrade(w, r, responseHeader any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockUpgrader)(nil).Upgrade), w, r, responseHeader)
}

// MockConnection is a mock of Connection interface.
type MockConnection struct {
	ctrl     *gomock.Controller
	recorder *MockConnectionMockRecorder
	isgomock struct{}
}

// MockConnectionMockRecorder is the mock recorder for MockConnection.
type MockConnectionMockRecorder struct {
	mock *MockConnection
}

// NewMockConnection creates a new mock instance.
func NewMockConnection(ctrl *gomock.Controller) *MockConnection {
	mock := &MockConnection{ctrl: ctrl}
	mock.recorder = &MockConnectionMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockConnection) EXPECT() *MockConnectionMockRecorder {
	return m.recorder
}

// Close mocks base method.
func (m *MockConnection) Close() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Close")
	ret0, _ := ret[0].(error)
	return ret0
}

// Close indicates an expected call of Close.
func (mr *MockConnectionMockRecorder) Close() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConnection)(nil).Close))
}

// ReadJSON mocks base method.
func (m *MockConnection) ReadJSON(v any) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ReadJSON", v)
	ret0, _ := ret[0].(error)
	return ret0
}

// ReadJSON indicates an expected call of ReadJSON.
func (mr *MockConnectionMockRecorder) ReadJSON(v any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadJSON", reflect.TypeOf((*MockConnection)(nil).ReadJSON), v)
}

// RemoteAddr mocks base method.
func (m *MockConnection) RemoteAddr() net.Addr {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RemoteAddr")
	ret0, _ := ret[0].(net.Addr)
	return ret0
}

// RemoteAddr indicates an expected call of RemoteAddr.
func (mr *MockConnectionMockRecorder) RemoteAddr() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockConnection)(nil).RemoteAddr))
}

// SetPongHandler mocks base method.
func (m *MockConnection) SetPongHandler(h func(string) error) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "SetPongHandler", h)
}

// SetPongHandler indicates an expected call of SetPongHandler.
func (mr *MockConnectionMockRecorder) SetPongHandler(h any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPongHandler", reflect.TypeOf((*MockConnection)(nil).SetPongHandler), h)
}

// SetReadDeadline mocks base method.
func (m *MockConnection) SetReadDeadline(t time.Time) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SetReadDeadline", t)
	ret0, _ := ret[0].(error)
	return ret0
}

// SetReadDeadline indicates an expected call of SetReadDeadline.
func (mr *MockConnectionMockRecorder) SetReadDeadline(t any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockConnection)(nil).SetReadDeadline), t)
}

// WriteControl mocks base method.
func (m *MockConnection) WriteControl(messageType int, data []byte, deadline time.Time) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "WriteControl", messageType, data, deadline)
	ret0, _ := ret[0].(error)
	return ret0
}

// WriteControl indicates an expected call of WriteControl.
func (mr *MockConnectionMockRecorder) WriteControl(messageType, data, deadline any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteControl", reflect.TypeOf((*MockConnection)(nil).WriteControl), messageType, data, deadline)
}

// WriteJSON mocks base method.
func (m *MockConnection) WriteJSON(v any) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "WriteJSON", v)
	ret0, _ := ret[0].(error)
	return ret0
}

// WriteJSON indicates an expected call of WriteJSON.
func (mr *MockConnectionMockRecorder) WriteJSON(v any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteJSON", reflect.TypeOf((*MockConnection)(nil).WriteJSON), v)
}

// MockAuthorizer is a mock of Authorizer interface.
type MockAuthorizer struct {
	ctrl     *gomock.Controller
	recorder *MockAuthorizerMockRecorder
	isgomock struct{}
}

// MockAuthorizerMockRecorder is the mock recorder for MockAuthorizer.
type MockAuthorizerMockRecorder struct {
	mock *MockAuthorizer
}

// NewMockAuthorizer creates a new mock instance.
func NewMockAuthorizer(ctrl *gomock.Controller) *MockAuthorizer {
	mock := &MockAuthorizer{ctrl: ctrl}
	mock.recorder = &MockAuthorizerMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockAuthorizer) EXPECT() *MockAuthorizerMockRecorder {
	return m.recorder
}

// AddGroup mocks base method.
func (m *MockAuthorizer) AddGroup(group string, perms []string, check websocket.GroupCheckExists) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddGroup", group, perms, check)
	ret0, _ := ret[0].(error)
	return ret0
}

// AddGroup indicates an expected call of AddGroup.
func (mr *MockAuthorizerMockRecorder) AddGroup(group, perms, check any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddGroup", reflect.TypeOf((*MockAuthorizer)(nil).AddGroup), group, perms, check)
}

// AddRoom mocks base method.
func (m *MockAuthorizer) AddRoom(room string, perms []string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddRoom", room, perms)
	ret0, _ := ret[0].(error)
	return ret0
}

// AddRoom indicates an expected call of AddRoom.
func (mr *MockAuthorizerMockRecorder) AddRoom(room, perms any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRoom", reflect.TypeOf((*MockAuthorizer)(nil).AddRoom), room, perms)
}

// Authenticate mocks base method.
func (m *MockAuthorizer) Authenticate(ctx context.Context, token string) (string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Authenticate", ctx, token)
	ret0, _ := ret[0].(string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Authenticate indicates an expected call of Authenticate.
func (mr *MockAuthorizerMockRecorder) Authenticate(ctx, token any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Authenticate", reflect.TypeOf((*MockAuthorizer)(nil).Authenticate), ctx, token)
}

// Authorize mocks base method.
func (m *MockAuthorizer) Authorize(ctx context.Context, userID, room string) (bool, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Authorize", ctx, userID, room)
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Authorize indicates an expected call of Authorize.
func (mr *MockAuthorizerMockRecorder) Authorize(ctx, userID, room any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Authorize", reflect.TypeOf((*MockAuthorizer)(nil).Authorize), ctx, userID, room)
}

// GetGroupIDs mocks base method.
func (m *MockAuthorizer) GetGroupIDs(group string) []string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetGroupIDs", group)
	ret0, _ := ret[0].([]string)
	return ret0
}

// GetGroupIDs indicates an expected call of GetGroupIDs.
func (mr *MockAuthorizerMockRecorder) GetGroupIDs(group any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGroupIDs", reflect.TypeOf((*MockAuthorizer)(nil).GetGroupIDs), group)
}

// RemoveGroupRoom mocks base method.
func (m *MockAuthorizer) RemoveGroupRoom(group, id string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RemoveGroupRoom", group, id)
	ret0, _ := ret[0].(error)
	return ret0
}

// RemoveGroupRoom indicates an expected call of RemoveGroupRoom.
func (mr *MockAuthorizerMockRecorder) RemoveGroupRoom(group, id any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveGroupRoom", reflect.TypeOf((*MockAuthorizer)(nil).RemoveGroupRoom), group, id)
}

// MockHub is a mock of Hub interface.
type MockHub struct {
	ctrl     *gomock.Controller
	recorder *MockHubMockRecorder
	isgomock struct{}
}

// MockHubMockRecorder is the mock recorder for MockHub.
type MockHubMockRecorder struct {
	mock *MockHub
}

// NewMockHub creates a new mock instance.
func NewMockHub(ctrl *gomock.Controller) *MockHub {
	mock := &MockHub{ctrl: ctrl}
	mock.recorder = &MockHubMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockHub) EXPECT() *MockHubMockRecorder {
	return m.recorder
}

// CloseGroupRoom mocks base method.
func (m *MockHub) CloseGroupRoom(group, id string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CloseGroupRoom", group, id)
	ret0, _ := ret[0].(error)
	return ret0
}

// CloseGroupRoom indicates an expected call of CloseGroupRoom.
func (mr *MockHubMockRecorder) CloseGroupRoom(group, id any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseGroupRoom", reflect.TypeOf((*MockHub)(nil).CloseGroupRoom), group, id)
}

// CloseGroupRoomAndNotify mocks base method.
func (m *MockHub) CloseGroupRoomAndNotify(group, id string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CloseGroupRoomAndNotify", group, id)
	ret0, _ := ret[0].(error)
	return ret0
}

// CloseGroupRoomAndNotify indicates an expected call of CloseGroupRoomAndNotify.
func (mr *MockHubMockRecorder) CloseGroupRoomAndNotify(group, id any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseGroupRoomAndNotify", reflect.TypeOf((*MockHub)(nil).CloseGroupRoomAndNotify), group, id)
}

// Connect mocks base method.
func (m *MockHub) Connect(w http.ResponseWriter, r *http.Request) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Connect", w, r)
	ret0, _ := ret[0].(error)
	return ret0
}

// Connect indicates an expected call of Connect.
func (mr *MockHubMockRecorder) Connect(w, r any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connect", reflect.TypeOf((*MockHub)(nil).Connect), w, r)
}

// GetConnections mocks base method.
func (m *MockHub) GetConnections() []websocket.UserConnection {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetConnections")
	ret0, _ := ret[0].([]websocket.UserConnection)
	return ret0
}

// GetConnections indicates an expected call of GetConnections.
func (mr *MockHubMockRecorder) GetConnections() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnections", reflect.TypeOf((*MockHub)(nil).GetConnections))
}

// GetGroupIDs mocks base method.
func (m *MockHub) GetGroupIDs(group string) []string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetGroupIDs", group)
	ret0, _ := ret[0].([]string)
	return ret0
}

// GetGroupIDs indicates an expected call of GetGroupIDs.
func (mr *MockHubMockRecorder) GetGroupIDs(group any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGroupIDs", reflect.TypeOf((*MockHub)(nil).GetGroupIDs), group)
}

// GetUserIDs mocks base method.
func (m *MockHub) GetUserIDs() []string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetUserIDs")
	ret0, _ := ret[0].([]string)
	return ret0
}

// GetUserIDs indicates an expected call of GetUserIDs.
func (mr *MockHubMockRecorder) GetUserIDs() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserIDs", reflect.TypeOf((*MockHub)(nil).GetUserIDs))
}

// GetUserTokens mocks base method.
func (m *MockHub) GetUserTokens() []string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetUserTokens")
	ret0, _ := ret[0].([]string)
	return ret0
}

// GetUserTokens indicates an expected call of GetUserTokens.
func (mr *MockHubMockRecorder) GetUserTokens() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserTokens", reflect.TypeOf((*MockHub)(nil).GetUserTokens))
}

// IsGroupRoomConnected mocks base method.
func (m *MockHub) IsGroupRoomConnected(group, id string) bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IsGroupRoomConnected", group, id)
	ret0, _ := ret[0].(bool)
	return ret0
}

// IsGroupRoomConnected indicates an expected call of IsGroupRoomConnected.
func (mr *MockHubMockRecorder) IsGroupRoomConnected(group, id any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsGroupRoomConnected", reflect.TypeOf((*MockHub)(nil).IsGroupRoomConnected), group, id)
}

// RegisterGroup mocks base method.
func (m *MockHub) RegisterGroup(group string, params websocket.GroupParameters, perms ...string) error {
	m.ctrl.T.Helper()
	varargs := []any{group, params}
	for _, a := range perms {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "RegisterGroup", varargs...)
	ret0, _ := ret[0].(error)
	return ret0
}

// RegisterGroup indicates an expected call of RegisterGroup.
func (mr *MockHubMockRecorder) RegisterGroup(group, params any, perms ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{group, params}, perms...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGroup", reflect.TypeOf((*MockHub)(nil).RegisterGroup), varargs...)
}

// RegisterRoom mocks base method.
func (m *MockHub) RegisterRoom(room string, perms ...string) error {
	m.ctrl.T.Helper()
	varargs := []any{room}
	for _, a := range perms {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "RegisterRoom", varargs...)
	ret0, _ := ret[0].(error)
	return ret0
}

// RegisterRoom indicates an expected call of RegisterRoom.
func (mr *MockHubMockRecorder) RegisterRoom(room any, perms ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{room}, perms...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterRoom", reflect.TypeOf((*MockHub)(nil).RegisterRoom), varargs...)
}

// Send mocks base method.
func (m *MockHub) Send(room string, msg any) int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Send", room, msg)
	ret0, _ := ret[0].(int)
	return ret0
}

// Send indicates an expected call of Send.
func (mr *MockHubMockRecorder) Send(room, msg any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockHub)(nil).Send), room, msg)
}

// SendGroupRoom mocks base method.
func (m *MockHub) SendGroupRoom(group, id string, msg any) int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SendGroupRoom", group, id, msg)
	ret0, _ := ret[0].(int)
	return ret0
}

// SendGroupRoom indicates an expected call of SendGroupRoom.
func (mr *MockHubMockRecorder) SendGroupRoom(group, id, msg any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendGroupRoom", reflect.TypeOf((*MockHub)(nil).SendGroupRoom), group, id, msg)
}

// SendGroupRoomByConnections mocks base method.
func (m *MockHub) SendGroupRoomByConnections(connIDs []string, group, id string, b any) int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SendGroupRoomByConnections", connIDs, group, id, b)
	ret0, _ := ret[0].(int)
	return ret0
}

// SendGroupRoomByConnections indicates an expected call of SendGroupRoomByConnections.
func (mr *MockHubMockRecorder) SendGroupRoomByConnections(connIDs, group, id, b any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendGroupRoomByConnections", reflect.TypeOf((*MockHub)(nil).SendGroupRoomByConnections), connIDs, group, id, b)
}

// SendRoomByConnections mocks base method.
func (m *MockHub) SendRoomByConnections(connIDs []string, room string, b any) int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SendRoomByConnections", connIDs, room, b)
	ret0, _ := ret[0].(int)
	return ret0
}

// SendRoomByConnections indicates an expected call of SendRoomByConnections.
func (mr *MockHubMockRecorder) SendRoomByConnections(connIDs, room, b any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendRoomByConnections", reflect.TypeOf((*MockHub)(nil).SendRoomByConnections), connIDs, room, b)
}

// SendRoomByUser mocks base method.
func (m *MockHub) SendRoomByUser(userID, room string, b any) int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SendRoomByUser", userID, room, b)
	ret0, _ := ret[0].(int)
	return ret0
}

// SendRoomByUser indicates an expected call of SendRoomByUser.
func (mr *MockHubMockRecorder) SendRoomByUser(userID, room, b any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendRoomByUser", reflect.TypeOf((*MockHub)(nil).SendRoomByUser), userID, room, b)
}

// Start mocks base method.
func (m *MockHub) Start(ctx context.Context) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Start", ctx)
}

// Start indicates an expected call of Start.
func (mr *MockHubMockRecorder) Start(ctx any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockHub)(nil).Start), ctx)
}
