// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq

package client

import (
	"github.com/cli/cli/v2/internal/ghrepo"
	"sync"
)

// Ensure, that DiscussionClientMock does implement DiscussionClient.
// If this is not the case, regenerate this file with moq.
var _ DiscussionClient = &DiscussionClientMock{}

// DiscussionClientMock is a mock implementation of DiscussionClient.
//
//	func TestSomethingThatUsesDiscussionClient(t *testing.T) {
//
//		// make and configure a mocked DiscussionClient
//		mockedDiscussionClient := &DiscussionClientMock{
//			AddCommentFunc: func(repo ghrepo.Interface, discussionID string, body string, replyToID string) (*DiscussionComment, error) {
//				panic("mock out the AddComment method")
//			},
//			CreateFunc: func(repo ghrepo.Interface, input CreateDiscussionInput) (*Discussion, error) {
//				panic("mock out the Create method")
//			},
//			DeleteCommentFunc: func(repo ghrepo.Interface, commentID string) error {
//				panic("mock out the DeleteComment method")
//			},
//			GetByNumberFunc: func(repo ghrepo.Interface, number int32) (*Discussion, error) {
//				panic("mock out the GetByNumber method")
//			},
//			GetCommentFunc: func(host string, commentID string) (*DiscussionComment, error) {
//				panic("mock out the GetComment method")
//			},
//			GetCommentRepliesFunc: func(host string, commentID string, limit int, after string, newest bool) (*Discussion, error) {
//				panic("mock out the GetCommentReplies method")
//			},
//			GetWithCommentsFunc: func(repo ghrepo.Interface, number int32, commentLimit int, after string, newest bool) (*Discussion, error) {
//				panic("mock out the GetWithComments method")
//			},
//			ListFunc: func(repo ghrepo.Interface, filters ListFilters, after string, limit int) (*DiscussionListResult, error) {
//				panic("mock out the List method")
//			},
//			ListCategoriesFunc: func(repo ghrepo.Interface) ([]DiscussionCategory, error) {
//				panic("mock out the ListCategories method")
//			},
//			ListLabelsFunc: func(repo ghrepo.Interface) ([]DiscussionLabel, error) {
//				panic("mock out the ListLabels method")
//			},
//			ResolveCommentNodeIDFunc: func(repo ghrepo.Interface, commentDatabaseID int64) (string, error) {
//				panic("mock out the ResolveCommentNodeID method")
//			},
//			SearchFunc: func(repo ghrepo.Interface, filters SearchFilters, after string, limit int) (*DiscussionListResult, error) {
//				panic("mock out the Search method")
//			},
//			UpdateFunc: func(repo ghrepo.Interface, input UpdateDiscussionInput) (*Discussion, error) {
//				panic("mock out the Update method")
//			},
//			UpdateCommentFunc: func(repo ghrepo.Interface, commentID string, body string) (*DiscussionComment, error) {
//				panic("mock out the UpdateComment method")
//			},
//		}
//
//		// use mockedDiscussionClient in code that requires DiscussionClient
//		// and then make assertions.
//
//	}
type DiscussionClientMock struct {
	// AddCommentFunc mocks the AddComment method.
	AddCommentFunc func(repo ghrepo.Interface, discussionID string, body string, replyToID string) (*DiscussionComment, error)

	// CreateFunc mocks the Create method.
	CreateFunc func(repo ghrepo.Interface, input CreateDiscussionInput) (*Discussion, error)

	// DeleteCommentFunc mocks the DeleteComment method.
	DeleteCommentFunc func(repo ghrepo.Interface, commentID string) error

	// GetByNumberFunc mocks the GetByNumber method.
	GetByNumberFunc func(repo ghrepo.Interface, number int32) (*Discussion, error)

	// GetCommentFunc mocks the GetComment method.
	GetCommentFunc func(host string, commentID string) (*DiscussionComment, error)

	// GetCommentRepliesFunc mocks the GetCommentReplies method.
	GetCommentRepliesFunc func(host string, commentID string, limit int, after string, newest bool) (*Discussion, error)

	// GetWithCommentsFunc mocks the GetWithComments method.
	GetWithCommentsFunc func(repo ghrepo.Interface, number int32, commentLimit int, after string, newest bool) (*Discussion, error)

	// ListFunc mocks the List method.
	ListFunc func(repo ghrepo.Interface, filters ListFilters, after string, limit int) (*DiscussionListResult, error)

	// ListCategoriesFunc mocks the ListCategories method.
	ListCategoriesFunc func(repo ghrepo.Interface) ([]DiscussionCategory, error)

	// ListLabelsFunc mocks the ListLabels method.
	ListLabelsFunc func(repo ghrepo.Interface) ([]DiscussionLabel, error)

	// ResolveCommentNodeIDFunc mocks the ResolveCommentNodeID method.
	ResolveCommentNodeIDFunc func(repo ghrepo.Interface, commentDatabaseID int64) (string, error)

	// SearchFunc mocks the Search method.
	SearchFunc func(repo ghrepo.Interface, filters SearchFilters, after string, limit int) (*DiscussionListResult, error)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(repo ghrepo.Interface, input UpdateDiscussionInput) (*Discussion, error)

	// UpdateCommentFunc mocks the UpdateComment method.
	UpdateCommentFunc func(repo ghrepo.Interface, commentID string, body string) (*DiscussionComment, error)

	// calls tracks calls to the methods.
	calls struct {
		// AddComment holds details about calls to the AddComment method.
		AddComment []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
			// DiscussionID is the discussionID argument value.
			DiscussionID string
			// Body is the body argument value.
			Body string
			// ReplyToID is the replyToID argument value.
			ReplyToID string
		}
		// Create holds details about calls to the Create method.
		Create []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
			// Input is the input argument value.
			Input CreateDiscussionInput
		}
		// DeleteComment holds details about calls to the DeleteComment method.
		DeleteComment []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
			// CommentID is the commentID argument value.
			CommentID string
		}
		// GetByNumber holds details about calls to the GetByNumber method.
		GetByNumber []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
			// Number is the number argument value.
			Number int32
		}
		// GetComment holds details about calls to the GetComment method.
		GetComment []struct {
			// Host is the host argument value.
			Host string
			// CommentID is the commentID argument value.
			CommentID string
		}
		// GetCommentReplies holds details about calls to the GetCommentReplies method.
		GetCommentReplies []struct {
			// Host is the host argument value.
			Host string
			// CommentID is the commentID argument value.
			CommentID string
			// Limit is the limit argument value.
			Limit int
			// After is the after argument value.
			After string
			// Newest is the newest argument value.
			Newest bool
		}
		// GetWithComments holds details about calls to the GetWithComments method.
		GetWithComments []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
			// Number is the number argument value.
			Number int32
			// CommentLimit is the commentLimit argument value.
			CommentLimit int
			// After is the after argument value.
			After string
			// Newest is the newest argument value.
			Newest bool
		}
		// List holds details about calls to the List method.
		List []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
			// Filters is the filters argument value.
			Filters ListFilters
			// After is the after argument value.
			After string
			// Limit is the limit argument value.
			Limit int
		}
		// ListCategories holds details about calls to the ListCategories method.
		ListCategories []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
		}
		// ListLabels holds details about calls to the ListLabels method.
		ListLabels []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
		}
		// ResolveCommentNodeID holds details about calls to the ResolveCommentNodeID method.
		ResolveCommentNodeID []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
			// CommentDatabaseID is the commentDatabaseID argument value.
			CommentDatabaseID int64
		}
		// Search holds details about calls to the Search method.
		Search []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
			// Filters is the filters argument value.
			Filters SearchFilters
			// After is the after argument value.
			After string
			// Limit is the limit argument value.
			Limit int
		}
		// Update holds details about calls to the Update method.
		Update []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
			// Input is the input argument value.
			Input UpdateDiscussionInput
		}
		// UpdateComment holds details about calls to the UpdateComment method.
		UpdateComment []struct {
			// Repo is the repo argument value.
			Repo ghrepo.Interface
			// CommentID is the commentID argument value.
			CommentID string
			// Body is the body argument value.
			Body string
		}
	}
	lockAddComment           sync.RWMutex
	lockCreate               sync.RWMutex
	lockDeleteComment        sync.RWMutex
	lockGetByNumber          sync.RWMutex
	lockGetComment           sync.RWMutex
	lockGetCommentReplies    sync.RWMutex
	lockGetWithComments      sync.RWMutex
	lockList                 sync.RWMutex
	lockListCategories       sync.RWMutex
	lockListLabels           sync.RWMutex
	lockResolveCommentNodeID sync.RWMutex
	lockSearch               sync.RWMutex
	lockUpdate               sync.RWMutex
	lockUpdateComment        sync.RWMutex
}

// AddComment calls AddCommentFunc.
func (mock *DiscussionClientMock) AddComment(repo ghrepo.Interface, discussionID string, body string, replyToID string) (*DiscussionComment, error) {
	if mock.AddCommentFunc == nil {
		panic("DiscussionClientMock.AddCommentFunc: method is nil but DiscussionClient.AddComment was just called")
	}
	callInfo := struct {
		Repo         ghrepo.Interface
		DiscussionID string
		Body         string
		ReplyToID    string
	}{
		Repo:         repo,
		DiscussionID: discussionID,
		Body:         body,
		ReplyToID:    replyToID,
	}
	mock.lockAddComment.Lock()
	mock.calls.AddComment = append(mock.calls.AddComment, callInfo)
	mock.lockAddComment.Unlock()
	return mock.AddCommentFunc(repo, discussionID, body, replyToID)
}

// AddCommentCalls gets all the calls that were made to AddComment.
// Check the length with:
//
//	len(mockedDiscussionClient.AddCommentCalls())
func (mock *DiscussionClientMock) AddCommentCalls() []struct {
	Repo         ghrepo.Interface
	DiscussionID string
	Body         string
	ReplyToID    string
} {
	var calls []struct {
		Repo         ghrepo.Interface
		DiscussionID string
		Body         string
		ReplyToID    string
	}
	mock.lockAddComment.RLock()
	calls = mock.calls.AddComment
	mock.lockAddComment.RUnlock()
	return calls
}

// Create calls CreateFunc.
func (mock *DiscussionClientMock) Create(repo ghrepo.Interface, input CreateDiscussionInput) (*Discussion, error) {
	if mock.CreateFunc == nil {
		panic("DiscussionClientMock.CreateFunc: method is nil but DiscussionClient.Create was just called")
	}
	callInfo := struct {
		Repo  ghrepo.Interface
		Input CreateDiscussionInput
	}{
		Repo:  repo,
		Input: input,
	}
	mock.lockCreate.Lock()
	mock.calls.Create = append(mock.calls.Create, callInfo)
	mock.lockCreate.Unlock()
	return mock.CreateFunc(repo, input)
}

// CreateCalls gets all the calls that were made to Create.
// Check the length with:
//
//	len(mockedDiscussionClient.CreateCalls())
func (mock *DiscussionClientMock) CreateCalls() []struct {
	Repo  ghrepo.Interface
	Input CreateDiscussionInput
} {
	var calls []struct {
		Repo  ghrepo.Interface
		Input CreateDiscussionInput
	}
	mock.lockCreate.RLock()
	calls = mock.calls.Create
	mock.lockCreate.RUnlock()
	return calls
}

// DeleteComment calls DeleteCommentFunc.
func (mock *DiscussionClientMock) DeleteComment(repo ghrepo.Interface, commentID string) error {
	if mock.DeleteCommentFunc == nil {
		panic("DiscussionClientMock.DeleteCommentFunc: method is nil but DiscussionClient.DeleteComment was just called")
	}
	callInfo := struct {
		Repo      ghrepo.Interface
		CommentID string
	}{
		Repo:      repo,
		CommentID: commentID,
	}
	mock.lockDeleteComment.Lock()
	mock.calls.DeleteComment = append(mock.calls.DeleteComment, callInfo)
	mock.lockDeleteComment.Unlock()
	return mock.DeleteCommentFunc(repo, commentID)
}

// DeleteCommentCalls gets all the calls that were made to DeleteComment.
// Check the length with:
//
//	len(mockedDiscussionClient.DeleteCommentCalls())
func (mock *DiscussionClientMock) DeleteCommentCalls() []struct {
	Repo      ghrepo.Interface
	CommentID string
} {
	var calls []struct {
		Repo      ghrepo.Interface
		CommentID string
	}
	mock.lockDeleteComment.RLock()
	calls = mock.calls.DeleteComment
	mock.lockDeleteComment.RUnlock()
	return calls
}

// GetByNumber calls GetByNumberFunc.
func (mock *DiscussionClientMock) GetByNumber(repo ghrepo.Interface, number int32) (*Discussion, error) {
	if mock.GetByNumberFunc == nil {
		panic("DiscussionClientMock.GetByNumberFunc: method is nil but DiscussionClient.GetByNumber was just called")
	}
	callInfo := struct {
		Repo   ghrepo.Interface
		Number int32
	}{
		Repo:   repo,
		Number: number,
	}
	mock.lockGetByNumber.Lock()
	mock.calls.GetByNumber = append(mock.calls.GetByNumber, callInfo)
	mock.lockGetByNumber.Unlock()
	return mock.GetByNumberFunc(repo, number)
}

// GetByNumberCalls gets all the calls that were made to GetByNumber.
// Check the length with:
//
//	len(mockedDiscussionClient.GetByNumberCalls())
func (mock *DiscussionClientMock) GetByNumberCalls() []struct {
	Repo   ghrepo.Interface
	Number int32
} {
	var calls []struct {
		Repo   ghrepo.Interface
		Number int32
	}
	mock.lockGetByNumber.RLock()
	calls = mock.calls.GetByNumber
	mock.lockGetByNumber.RUnlock()
	return calls
}

// GetComment calls GetCommentFunc.
func (mock *DiscussionClientMock) GetComment(host string, commentID string) (*DiscussionComment, error) {
	if mock.GetCommentFunc == nil {
		panic("DiscussionClientMock.GetCommentFunc: method is nil but DiscussionClient.GetComment was just called")
	}
	callInfo := struct {
		Host      string
		CommentID string
	}{
		Host:      host,
		CommentID: commentID,
	}
	mock.lockGetComment.Lock()
	mock.calls.GetComment = append(mock.calls.GetComment, callInfo)
	mock.lockGetComment.Unlock()
	return mock.GetCommentFunc(host, commentID)
}

// GetCommentCalls gets all the calls that were made to GetComment.
// Check the length with:
//
//	len(mockedDiscussionClient.GetCommentCalls())
func (mock *DiscussionClientMock) GetCommentCalls() []struct {
	Host      string
	CommentID string
} {
	var calls []struct {
		Host      string
		CommentID string
	}
	mock.lockGetComment.RLock()
	calls = mock.calls.GetComment
	mock.lockGetComment.RUnlock()
	return calls
}

// GetCommentReplies calls GetCommentRepliesFunc.
func (mock *DiscussionClientMock) GetCommentReplies(host string, commentID string, limit int, after string, newest bool) (*Discussion, error) {
	if mock.GetCommentRepliesFunc == nil {
		panic("DiscussionClientMock.GetCommentRepliesFunc: method is nil but DiscussionClient.GetCommentReplies was just called")
	}
	callInfo := struct {
		Host      string
		CommentID string
		Limit     int
		After     string
		Newest    bool
	}{
		Host:      host,
		CommentID: commentID,
		Limit:     limit,
		After:     after,
		Newest:    newest,
	}
	mock.lockGetCommentReplies.Lock()
	mock.calls.GetCommentReplies = append(mock.calls.GetCommentReplies, callInfo)
	mock.lockGetCommentReplies.Unlock()
	return mock.GetCommentRepliesFunc(host, commentID, limit, after, newest)
}

// GetCommentRepliesCalls gets all the calls that were made to GetCommentReplies.
// Check the length with:
//
//	len(mockedDiscussionClient.GetCommentRepliesCalls())
func (mock *DiscussionClientMock) GetCommentRepliesCalls() []struct {
	Host      string
	CommentID string
	Limit     int
	After     string
	Newest    bool
} {
	var calls []struct {
		Host      string
		CommentID string
		Limit     int
		After     string
		Newest    bool
	}
	mock.lockGetCommentReplies.RLock()
	calls = mock.calls.GetCommentReplies
	mock.lockGetCommentReplies.RUnlock()
	return calls
}

// GetWithComments calls GetWithCommentsFunc.
func (mock *DiscussionClientMock) GetWithComments(repo ghrepo.Interface, number int32, commentLimit int, after string, newest bool) (*Discussion, error) {
	if mock.GetWithCommentsFunc == nil {
		panic("DiscussionClientMock.GetWithCommentsFunc: method is nil but DiscussionClient.GetWithComments was just called")
	}
	callInfo := struct {
		Repo         ghrepo.Interface
		Number       int32
		CommentLimit int
		After        string
		Newest       bool
	}{
		Repo:         repo,
		Number:       number,
		CommentLimit: commentLimit,
		After:        after,
		Newest:       newest,
	}
	mock.lockGetWithComments.Lock()
	mock.calls.GetWithComments = append(mock.calls.GetWithComments, callInfo)
	mock.lockGetWithComments.Unlock()
	return mock.GetWithCommentsFunc(repo, number, commentLimit, after, newest)
}

// GetWithCommentsCalls gets all the calls that were made to GetWithComments.
// Check the length with:
//
//	len(mockedDiscussionClient.GetWithCommentsCalls())
func (mock *DiscussionClientMock) GetWithCommentsCalls() []struct {
	Repo         ghrepo.Interface
	Number       int32
	CommentLimit int
	After        string
	Newest       bool
} {
	var calls []struct {
		Repo         ghrepo.Interface
		Number       int32
		CommentLimit int
		After        string
		Newest       bool
	}
	mock.lockGetWithComments.RLock()
	calls = mock.calls.GetWithComments
	mock.lockGetWithComments.RUnlock()
	return calls
}

// List calls ListFunc.
func (mock *DiscussionClientMock) List(repo ghrepo.Interface, filters ListFilters, after string, limit int) (*DiscussionListResult, error) {
	if mock.ListFunc == nil {
		panic("DiscussionClientMock.ListFunc: method is nil but DiscussionClient.List was just called")
	}
	callInfo := struct {
		Repo    ghrepo.Interface
		Filters ListFilters
		After   string
		Limit   int
	}{
		Repo:    repo,
		Filters: filters,
		After:   after,
		Limit:   limit,
	}
	mock.lockList.Lock()
	mock.calls.List = append(mock.calls.List, callInfo)
	mock.lockList.Unlock()
	return mock.ListFunc(repo, filters, after, limit)
}

// ListCalls gets all the calls that were made to List.
// Check the length with:
//
//	len(mockedDiscussionClient.ListCalls())
func (mock *DiscussionClientMock) ListCalls() []struct {
	Repo    ghrepo.Interface
	Filters ListFilters
	After   string
	Limit   int
} {
	var calls []struct {
		Repo    ghrepo.Interface
		Filters ListFilters
		After   string
		Limit   int
	}
	mock.lockList.RLock()
	calls = mock.calls.List
	mock.lockList.RUnlock()
	return calls
}

// ListCategories calls ListCategoriesFunc.
func (mock *DiscussionClientMock) ListCategories(repo ghrepo.Interface) ([]DiscussionCategory, error) {
	if mock.ListCategoriesFunc == nil {
		panic("DiscussionClientMock.ListCategoriesFunc: method is nil but DiscussionClient.ListCategories was just called")
	}
	callInfo := struct {
		Repo ghrepo.Interface
	}{
		Repo: repo,
	}
	mock.lockListCategories.Lock()
	mock.calls.ListCategories = append(mock.calls.ListCategories, callInfo)
	mock.lockListCategories.Unlock()
	return mock.ListCategoriesFunc(repo)
}

// ListCategoriesCalls gets all the calls that were made to ListCategories.
// Check the length with:
//
//	len(mockedDiscussionClient.ListCategoriesCalls())
func (mock *DiscussionClientMock) ListCategoriesCalls() []struct {
	Repo ghrepo.Interface
} {
	var calls []struct {
		Repo ghrepo.Interface
	}
	mock.lockListCategories.RLock()
	calls = mock.calls.ListCategories
	mock.lockListCategories.RUnlock()
	return calls
}

// ListLabels calls ListLabelsFunc.
func (mock *DiscussionClientMock) ListLabels(repo ghrepo.Interface) ([]DiscussionLabel, error) {
	if mock.ListLabelsFunc == nil {
		panic("DiscussionClientMock.ListLabelsFunc: method is nil but DiscussionClient.ListLabels was just called")
	}
	callInfo := struct {
		Repo ghrepo.Interface
	}{
		Repo: repo,
	}
	mock.lockListLabels.Lock()
	mock.calls.ListLabels = append(mock.calls.ListLabels, callInfo)
	mock.lockListLabels.Unlock()
	return mock.ListLabelsFunc(repo)
}

// ListLabelsCalls gets all the calls that were made to ListLabels.
// Check the length with:
//
//	len(mockedDiscussionClient.ListLabelsCalls())
func (mock *DiscussionClientMock) ListLabelsCalls() []struct {
	Repo ghrepo.Interface
} {
	var calls []struct {
		Repo ghrepo.Interface
	}
	mock.lockListLabels.RLock()
	calls = mock.calls.ListLabels
	mock.lockListLabels.RUnlock()
	return calls
}

// ResolveCommentNodeID calls ResolveCommentNodeIDFunc.
func (mock *DiscussionClientMock) ResolveCommentNodeID(repo ghrepo.Interface, commentDatabaseID int64) (string, error) {
	if mock.ResolveCommentNodeIDFunc == nil {
		panic("DiscussionClientMock.ResolveCommentNodeIDFunc: method is nil but DiscussionClient.ResolveCommentNodeID was just called")
	}
	callInfo := struct {
		Repo              ghrepo.Interface
		CommentDatabaseID int64
	}{
		Repo:              repo,
		CommentDatabaseID: commentDatabaseID,
	}
	mock.lockResolveCommentNodeID.Lock()
	mock.calls.ResolveCommentNodeID = append(mock.calls.ResolveCommentNodeID, callInfo)
	mock.lockResolveCommentNodeID.Unlock()
	return mock.ResolveCommentNodeIDFunc(repo, commentDatabaseID)
}

// ResolveCommentNodeIDCalls gets all the calls that were made to ResolveCommentNodeID.
// Check the length with:
//
//	len(mockedDiscussionClient.ResolveCommentNodeIDCalls())
func (mock *DiscussionClientMock) ResolveCommentNodeIDCalls() []struct {
	Repo              ghrepo.Interface
	CommentDatabaseID int64
} {
	var calls []struct {
		Repo              ghrepo.Interface
		CommentDatabaseID int64
	}
	mock.lockResolveCommentNodeID.RLock()
	calls = mock.calls.ResolveCommentNodeID
	mock.lockResolveCommentNodeID.RUnlock()
	return calls
}

// Search calls SearchFunc.
func (mock *DiscussionClientMock) Search(repo ghrepo.Interface, filters SearchFilters, after string, limit int) (*DiscussionListResult, error) {
	if mock.SearchFunc == nil {
		panic("DiscussionClientMock.SearchFunc: method is nil but DiscussionClient.Search was just called")
	}
	callInfo := struct {
		Repo    ghrepo.Interface
		Filters SearchFilters
		After   string
		Limit   int
	}{
		Repo:    repo,
		Filters: filters,
		After:   after,
		Limit:   limit,
	}
	mock.lockSearch.Lock()
	mock.calls.Search = append(mock.calls.Search, callInfo)
	mock.lockSearch.Unlock()
	return mock.SearchFunc(repo, filters, after, limit)
}

// SearchCalls gets all the calls that were made to Search.
// Check the length with:
//
//	len(mockedDiscussionClient.SearchCalls())
func (mock *DiscussionClientMock) SearchCalls() []struct {
	Repo    ghrepo.Interface
	Filters SearchFilters
	After   string
	Limit   int
} {
	var calls []struct {
		Repo    ghrepo.Interface
		Filters SearchFilters
		After   string
		Limit   int
	}
	mock.lockSearch.RLock()
	calls = mock.calls.Search
	mock.lockSearch.RUnlock()
	return calls
}

// Update calls UpdateFunc.
func (mock *DiscussionClientMock) Update(repo ghrepo.Interface, input UpdateDiscussionInput) (*Discussion, error) {
	if mock.UpdateFunc == nil {
		panic("DiscussionClientMock.UpdateFunc: method is nil but DiscussionClient.Update was just called")
	}
	callInfo := struct {
		Repo  ghrepo.Interface
		Input UpdateDiscussionInput
	}{
		Repo:  repo,
		Input: input,
	}
	mock.lockUpdate.Lock()
	mock.calls.Update = append(mock.calls.Update, callInfo)
	mock.lockUpdate.Unlock()
	return mock.UpdateFunc(repo, input)
}

// UpdateCalls gets all the calls that were made to Update.
// Check the length with:
//
//	len(mockedDiscussionClient.UpdateCalls())
func (mock *DiscussionClientMock) UpdateCalls() []struct {
	Repo  ghrepo.Interface
	Input UpdateDiscussionInput
} {
	var calls []struct {
		Repo  ghrepo.Interface
		Input UpdateDiscussionInput
	}
	mock.lockUpdate.RLock()
	calls = mock.calls.Update
	mock.lockUpdate.RUnlock()
	return calls
}

// UpdateComment calls UpdateCommentFunc.
func (mock *DiscussionClientMock) UpdateComment(repo ghrepo.Interface, commentID string, body string) (*DiscussionComment, error) {
	if mock.UpdateCommentFunc == nil {
		panic("DiscussionClientMock.UpdateCommentFunc: method is nil but DiscussionClient.UpdateComment was just called")
	}
	callInfo := struct {
		Repo      ghrepo.Interface
		CommentID string
		Body      string
	}{
		Repo:      repo,
		CommentID: commentID,
		Body:      body,
	}
	mock.lockUpdateComment.Lock()
	mock.calls.UpdateComment = append(mock.calls.UpdateComment, callInfo)
	mock.lockUpdateComment.Unlock()
	return mock.UpdateCommentFunc(repo, commentID, body)
}

// UpdateCommentCalls gets all the calls that were made to UpdateComment.
// Check the length with:
//
//	len(mockedDiscussionClient.UpdateCommentCalls())
func (mock *DiscussionClientMock) UpdateCommentCalls() []struct {
	Repo      ghrepo.Interface
	CommentID string
	Body      string
} {
	var calls []struct {
		Repo      ghrepo.Interface
		CommentID string
		Body      string
	}
	mock.lockUpdateComment.RLock()
	calls = mock.calls.UpdateComment
	mock.lockUpdateComment.RUnlock()
	return calls
}
