// Copyright 2013 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package github

import (
	
	
)

// ListAssignees fetches all available assignees (owners and collaborators) to
// which issues may be assigned.
//
// GitHub API docs: https://docs.github.com/rest/issues/assignees#list-assignees
//
//meta:operation GET /repos/{owner}/{repo}/assignees
func ( *IssuesService) ( context.Context, ,  string,  *ListOptions) ([]*User, *Response, error) {
	 := fmt.Sprintf("repos/%v/%v/assignees", , )
	,  := addOptions(, )
	if  != nil {
		return nil, nil, 
	}

	,  := .client.NewRequest("GET", , nil)
	if  != nil {
		return nil, nil, 
	}

	var  []*User
	,  := .client.Do(, , &)
	if  != nil {
		return nil, , 
	}

	return , , nil
}

// IsAssignee checks if a user is an assignee for the specified repository.
//
// GitHub API docs: https://docs.github.com/rest/issues/assignees#check-if-a-user-can-be-assigned
//
//meta:operation GET /repos/{owner}/{repo}/assignees/{assignee}
func ( *IssuesService) ( context.Context, , ,  string) (bool, *Response, error) {
	 := fmt.Sprintf("repos/%v/%v/assignees/%v", , , )
	,  := .client.NewRequest("GET", , nil)
	if  != nil {
		return false, nil, 
	}

	,  := .client.Do(, , nil)
	,  := parseBoolResponse()
	return , , 
}

// AddAssignees adds the provided GitHub users as assignees to the issue.
//
// GitHub API docs: https://docs.github.com/rest/issues/assignees#add-assignees-to-an-issue
//
//meta:operation POST /repos/{owner}/{repo}/issues/{issue_number}/assignees
func ( *IssuesService) ( context.Context, ,  string,  int,  []string) (*Issue, *Response, error) {
	 := &struct {
		 []string `json:"assignees,omitempty"`
	}{: }
	 := fmt.Sprintf("repos/%v/%v/issues/%v/assignees", , , )
	,  := .client.NewRequest("POST", , )
	if  != nil {
		return nil, nil, 
	}

	 := &Issue{}
	,  := .client.Do(, , )
	if  != nil {
		return nil, , 
	}

	return , , nil
}

// RemoveAssignees removes the provided GitHub users as assignees from the issue.
//
// GitHub API docs: https://docs.github.com/rest/issues/assignees#remove-assignees-from-an-issue
//
//meta:operation DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees
func ( *IssuesService) ( context.Context, ,  string,  int,  []string) (*Issue, *Response, error) {
	 := &struct {
		 []string `json:"assignees,omitempty"`
	}{: }
	 := fmt.Sprintf("repos/%v/%v/issues/%v/assignees", , , )
	,  := .client.NewRequest("DELETE", , )
	if  != nil {
		return nil, nil, 
	}

	 := &Issue{}
	,  := .client.Do(, , )
	if  != nil {
		return nil, , 
	}

	return , , nil
}