// Code generated by MockGen. DO NOT EDIT.
// Source: gitlab.com/gitlab-org/api/client-go/v2 (interfaces: ProtectedBranchesServiceInterface)
//
// Generated by this command:
//
//	mockgen -typed -destination=protected_branches_mock.go -write_package_comment=false -package=testing gitlab.com/gitlab-org/api/client-go/v2 ProtectedBranchesServiceInterface
//

package testing

import (
	reflect "reflect"

	gitlab "gitlab.com/gitlab-org/api/client-go/v2"
	gomock "go.uber.org/mock/gomock"
)

// MockProtectedBranchesServiceInterface is a mock of ProtectedBranchesServiceInterface interface.
type MockProtectedBranchesServiceInterface struct {
	ctrl     *gomock.Controller
	recorder *MockProtectedBranchesServiceInterfaceMockRecorder
	isgomock struct{}
}

// MockProtectedBranchesServiceInterfaceMockRecorder is the mock recorder for MockProtectedBranchesServiceInterface.
type MockProtectedBranchesServiceInterfaceMockRecorder struct {
	mock *MockProtectedBranchesServiceInterface
}

// NewMockProtectedBranchesServiceInterface creates a new mock instance.
func NewMockProtectedBranchesServiceInterface(ctrl *gomock.Controller) *MockProtectedBranchesServiceInterface {
	mock := &MockProtectedBranchesServiceInterface{ctrl: ctrl}
	mock.recorder = &MockProtectedBranchesServiceInterfaceMockRecorder{mock}
	return mock
}

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

// GetProtectedBranch mocks base method.
func (m *MockProtectedBranchesServiceInterface) GetProtectedBranch(pid any, branch string, options ...gitlab.RequestOptionFunc) (*gitlab.ProtectedBranch, *gitlab.Response, error) {
	m.ctrl.T.Helper()
	varargs := []any{pid, branch}
	for _, a := range options {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "GetProtectedBranch", varargs...)
	ret0, _ := ret[0].(*gitlab.ProtectedBranch)
	ret1, _ := ret[1].(*gitlab.Response)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// GetProtectedBranch indicates an expected call of GetProtectedBranch.
func (mr *MockProtectedBranchesServiceInterfaceMockRecorder) GetProtectedBranch(pid, branch any, options ...any) *MockProtectedBranchesServiceInterfaceGetProtectedBranchCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{pid, branch}, options...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProtectedBranch", reflect.TypeOf((*MockProtectedBranchesServiceInterface)(nil).GetProtectedBranch), varargs...)
	return &MockProtectedBranchesServiceInterfaceGetProtectedBranchCall{Call: call}
}

// MockProtectedBranchesServiceInterfaceGetProtectedBranchCall wrap *gomock.Call
type MockProtectedBranchesServiceInterfaceGetProtectedBranchCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockProtectedBranchesServiceInterfaceGetProtectedBranchCall) Return(arg0 *gitlab.ProtectedBranch, arg1 *gitlab.Response, arg2 error) *MockProtectedBranchesServiceInterfaceGetProtectedBranchCall {
	c.Call = c.Call.Return(arg0, arg1, arg2)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockProtectedBranchesServiceInterfaceGetProtectedBranchCall) Do(f func(any, string, ...gitlab.RequestOptionFunc) (*gitlab.ProtectedBranch, *gitlab.Response, error)) *MockProtectedBranchesServiceInterfaceGetProtectedBranchCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockProtectedBranchesServiceInterfaceGetProtectedBranchCall) DoAndReturn(f func(any, string, ...gitlab.RequestOptionFunc) (*gitlab.ProtectedBranch, *gitlab.Response, error)) *MockProtectedBranchesServiceInterfaceGetProtectedBranchCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// ListProtectedBranches mocks base method.
func (m *MockProtectedBranchesServiceInterface) ListProtectedBranches(pid any, opt *gitlab.ListProtectedBranchesOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.ProtectedBranch, *gitlab.Response, error) {
	m.ctrl.T.Helper()
	varargs := []any{pid, opt}
	for _, a := range options {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "ListProtectedBranches", varargs...)
	ret0, _ := ret[0].([]*gitlab.ProtectedBranch)
	ret1, _ := ret[1].(*gitlab.Response)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// ListProtectedBranches indicates an expected call of ListProtectedBranches.
func (mr *MockProtectedBranchesServiceInterfaceMockRecorder) ListProtectedBranches(pid, opt any, options ...any) *MockProtectedBranchesServiceInterfaceListProtectedBranchesCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{pid, opt}, options...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListProtectedBranches", reflect.TypeOf((*MockProtectedBranchesServiceInterface)(nil).ListProtectedBranches), varargs...)
	return &MockProtectedBranchesServiceInterfaceListProtectedBranchesCall{Call: call}
}

// MockProtectedBranchesServiceInterfaceListProtectedBranchesCall wrap *gomock.Call
type MockProtectedBranchesServiceInterfaceListProtectedBranchesCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockProtectedBranchesServiceInterfaceListProtectedBranchesCall) Return(arg0 []*gitlab.ProtectedBranch, arg1 *gitlab.Response, arg2 error) *MockProtectedBranchesServiceInterfaceListProtectedBranchesCall {
	c.Call = c.Call.Return(arg0, arg1, arg2)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockProtectedBranchesServiceInterfaceListProtectedBranchesCall) Do(f func(any, *gitlab.ListProtectedBranchesOptions, ...gitlab.RequestOptionFunc) ([]*gitlab.ProtectedBranch, *gitlab.Response, error)) *MockProtectedBranchesServiceInterfaceListProtectedBranchesCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockProtectedBranchesServiceInterfaceListProtectedBranchesCall) DoAndReturn(f func(any, *gitlab.ListProtectedBranchesOptions, ...gitlab.RequestOptionFunc) ([]*gitlab.ProtectedBranch, *gitlab.Response, error)) *MockProtectedBranchesServiceInterfaceListProtectedBranchesCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// ProtectRepositoryBranches mocks base method.
func (m *MockProtectedBranchesServiceInterface) ProtectRepositoryBranches(pid any, opt *gitlab.ProtectRepositoryBranchesOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProtectedBranch, *gitlab.Response, error) {
	m.ctrl.T.Helper()
	varargs := []any{pid, opt}
	for _, a := range options {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "ProtectRepositoryBranches", varargs...)
	ret0, _ := ret[0].(*gitlab.ProtectedBranch)
	ret1, _ := ret[1].(*gitlab.Response)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// ProtectRepositoryBranches indicates an expected call of ProtectRepositoryBranches.
func (mr *MockProtectedBranchesServiceInterfaceMockRecorder) ProtectRepositoryBranches(pid, opt any, options ...any) *MockProtectedBranchesServiceInterfaceProtectRepositoryBranchesCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{pid, opt}, options...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProtectRepositoryBranches", reflect.TypeOf((*MockProtectedBranchesServiceInterface)(nil).ProtectRepositoryBranches), varargs...)
	return &MockProtectedBranchesServiceInterfaceProtectRepositoryBranchesCall{Call: call}
}

// MockProtectedBranchesServiceInterfaceProtectRepositoryBranchesCall wrap *gomock.Call
type MockProtectedBranchesServiceInterfaceProtectRepositoryBranchesCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockProtectedBranchesServiceInterfaceProtectRepositoryBranchesCall) Return(arg0 *gitlab.ProtectedBranch, arg1 *gitlab.Response, arg2 error) *MockProtectedBranchesServiceInterfaceProtectRepositoryBranchesCall {
	c.Call = c.Call.Return(arg0, arg1, arg2)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockProtectedBranchesServiceInterfaceProtectRepositoryBranchesCall) Do(f func(any, *gitlab.ProtectRepositoryBranchesOptions, ...gitlab.RequestOptionFunc) (*gitlab.ProtectedBranch, *gitlab.Response, error)) *MockProtectedBranchesServiceInterfaceProtectRepositoryBranchesCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockProtectedBranchesServiceInterfaceProtectRepositoryBranchesCall) DoAndReturn(f func(any, *gitlab.ProtectRepositoryBranchesOptions, ...gitlab.RequestOptionFunc) (*gitlab.ProtectedBranch, *gitlab.Response, error)) *MockProtectedBranchesServiceInterfaceProtectRepositoryBranchesCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// UnprotectRepositoryBranches mocks base method.
func (m *MockProtectedBranchesServiceInterface) UnprotectRepositoryBranches(pid any, branch string, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error) {
	m.ctrl.T.Helper()
	varargs := []any{pid, branch}
	for _, a := range options {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "UnprotectRepositoryBranches", varargs...)
	ret0, _ := ret[0].(*gitlab.Response)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UnprotectRepositoryBranches indicates an expected call of UnprotectRepositoryBranches.
func (mr *MockProtectedBranchesServiceInterfaceMockRecorder) UnprotectRepositoryBranches(pid, branch any, options ...any) *MockProtectedBranchesServiceInterfaceUnprotectRepositoryBranchesCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{pid, branch}, options...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnprotectRepositoryBranches", reflect.TypeOf((*MockProtectedBranchesServiceInterface)(nil).UnprotectRepositoryBranches), varargs...)
	return &MockProtectedBranchesServiceInterfaceUnprotectRepositoryBranchesCall{Call: call}
}

// MockProtectedBranchesServiceInterfaceUnprotectRepositoryBranchesCall wrap *gomock.Call
type MockProtectedBranchesServiceInterfaceUnprotectRepositoryBranchesCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockProtectedBranchesServiceInterfaceUnprotectRepositoryBranchesCall) Return(arg0 *gitlab.Response, arg1 error) *MockProtectedBranchesServiceInterfaceUnprotectRepositoryBranchesCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockProtectedBranchesServiceInterfaceUnprotectRepositoryBranchesCall) Do(f func(any, string, ...gitlab.RequestOptionFunc) (*gitlab.Response, error)) *MockProtectedBranchesServiceInterfaceUnprotectRepositoryBranchesCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockProtectedBranchesServiceInterfaceUnprotectRepositoryBranchesCall) DoAndReturn(f func(any, string, ...gitlab.RequestOptionFunc) (*gitlab.Response, error)) *MockProtectedBranchesServiceInterfaceUnprotectRepositoryBranchesCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// UpdateProtectedBranch mocks base method.
func (m *MockProtectedBranchesServiceInterface) UpdateProtectedBranch(pid any, branch string, opt *gitlab.UpdateProtectedBranchOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProtectedBranch, *gitlab.Response, error) {
	m.ctrl.T.Helper()
	varargs := []any{pid, branch, opt}
	for _, a := range options {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "UpdateProtectedBranch", varargs...)
	ret0, _ := ret[0].(*gitlab.ProtectedBranch)
	ret1, _ := ret[1].(*gitlab.Response)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// UpdateProtectedBranch indicates an expected call of UpdateProtectedBranch.
func (mr *MockProtectedBranchesServiceInterfaceMockRecorder) UpdateProtectedBranch(pid, branch, opt any, options ...any) *MockProtectedBranchesServiceInterfaceUpdateProtectedBranchCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{pid, branch, opt}, options...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateProtectedBranch", reflect.TypeOf((*MockProtectedBranchesServiceInterface)(nil).UpdateProtectedBranch), varargs...)
	return &MockProtectedBranchesServiceInterfaceUpdateProtectedBranchCall{Call: call}
}

// MockProtectedBranchesServiceInterfaceUpdateProtectedBranchCall wrap *gomock.Call
type MockProtectedBranchesServiceInterfaceUpdateProtectedBranchCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockProtectedBranchesServiceInterfaceUpdateProtectedBranchCall) Return(arg0 *gitlab.ProtectedBranch, arg1 *gitlab.Response, arg2 error) *MockProtectedBranchesServiceInterfaceUpdateProtectedBranchCall {
	c.Call = c.Call.Return(arg0, arg1, arg2)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockProtectedBranchesServiceInterfaceUpdateProtectedBranchCall) Do(f func(any, string, *gitlab.UpdateProtectedBranchOptions, ...gitlab.RequestOptionFunc) (*gitlab.ProtectedBranch, *gitlab.Response, error)) *MockProtectedBranchesServiceInterfaceUpdateProtectedBranchCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockProtectedBranchesServiceInterfaceUpdateProtectedBranchCall) DoAndReturn(f func(any, string, *gitlab.UpdateProtectedBranchOptions, ...gitlab.RequestOptionFunc) (*gitlab.ProtectedBranch, *gitlab.Response, error)) *MockProtectedBranchesServiceInterfaceUpdateProtectedBranchCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}
