using System.Collections.Generic;
using System.Threading.Tasks;
namespace Octokit
{
///
/// A client for GitHub's User Administration API (GitHub Enterprise)
///
///
/// See the Administration API documentation for more details.
///
public interface IUserAdministrationClient
{
///
/// Create a new user (must be Site Admin user).
///
///
/// See the API documentation
/// for more information.
///
/// The object describing the user to create
/// The created object
Task Create(NewUser newUser);
///
/// Rename an existing user (must be Site Admin user).
///
///
/// See the API documentation
/// for more information.
/// Note that this queues a request to rename a user, rather than execute it straight away
///
/// The username to rename
/// The request, specifying the new login
/// A object indicating the queued task message and Url to the user
Task Rename(string login, UserRename userRename);
///
/// Create an impersonation OAuth token (must be Site Admin user).
///
///
/// See the API documentation
/// for more information.
///
/// The user to impersonate
/// The request specifying the required scopes
/// An object containing the impersonation token
Task CreateImpersonationToken(string login, NewImpersonationToken newImpersonationToken);
///
/// Deletes an impersonation OAuth token (must be Site Admin user).
///
///
/// See the API documentation
/// for more information.
///
/// The user to remove impersonation token from
///
Task DeleteImpersonationToken(string login);
///
/// Promotes ordinary user to a site administrator (must be Site Admin user).
///
///
/// See the API documentation
/// for more information.
///
/// The user to promote to administrator.
///
Task Promote(string login);
///
/// Demotes a site administrator to an ordinary user (must be Site Admin user).
///
///
/// See the API documentation
/// for more information.
///
/// The user to demote from administrator.
///
Task Demote(string login);
///
/// Suspends a user (must be Site Admin user).
///
///
/// See the API documentation
/// for more information.
///
/// The user to suspend.
///
Task Suspend(string login);
///
/// Unsuspends a user (must be Site Admin user).
///
///
/// See the API documentation
/// for more information.
///
/// The user to unsuspend.
///
Task Unsuspend(string login);
///
/// List all public keys (must be Site Admin user).
///
///
/// See the API documentation
/// for more information.
///
///
Task> ListAllPublicKeys();
///
/// Delete a user (must be Site Admin user).
///
///
/// See the API documentation
/// for more information.
///
/// The user to delete
///
Task Delete(string login);
///
/// Delete a public key (must be Site Admin user).
///
///
/// See the API documentation
/// for more information.
///
/// The key to delete
///
Task DeletePublicKey(int keyId);
}
}