using System;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
namespace Octokit.Reactive
{
///
/// A client for GitHub's Org Teams API.
///
///
/// See the Orgs API documentation for more information.
///
public interface IObservableTeamsClient
{
///
/// Gets a single by identifier.
///
///
/// https://developer.github.com/v3/orgs/teams/#get-team
///
/// The team identifier.
/// The with the given identifier.
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
IObservable Get(int id);
///
/// Returns all s for the current org.
///
/// Organization to list all teams of.
/// Thrown when a general API error occurs.
/// A list of the orgs's teams s.
IObservable GetAll(string org);
///
/// Returns all s for the current org.
///
/// Organization to list all teams of.
/// Options to change API behaviour.
/// Thrown when a general API error occurs.
/// A list of the orgs's teams s.
IObservable GetAll(string org, ApiOptions options);
///
/// Returns all s for the current user.
///
/// Thrown when a general API error occurs.
/// A list of the user's s.
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
IObservable GetAllForCurrent();
///
/// Returns all s for the current user.
///
/// Options to change API behaviour.
/// Thrown when a general API error occurs.
/// A list of the user's s.
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
IObservable GetAllForCurrent(ApiOptions options);
///
/// Returns all child teams of the given team.
///
///
/// https://developer.github.com/v3/orgs/teams/#list-child-teams
///
/// The team identifier
IObservable GetAllChildTeams(int id);
///
/// Returns all child teams of the given team.
///
///
/// https://developer.github.com/v3/orgs/teams/#list-child-teams
///
/// The team identifier
/// Options for changing the API response
IObservable GetAllChildTeams(int id, ApiOptions options);
///
/// Returns all members of the given team.
///
///
/// https://developer.github.com/v3/orgs/teams/#list-team-members
///
/// The team identifier
IObservable GetAllMembers(int id);
///
/// Returns all members of the given team.
///
///
/// https://developer.github.com/v3/orgs/teams/#list-team-members
///
/// The team identifier
/// Options to change API behaviour.
IObservable GetAllMembers(int id, ApiOptions options);
///
/// Returns all members with the specified role in the given team of the given role.
///
///
/// https://developer.github.com/v3/orgs/teams/#list-team-members
///
/// The team identifier
/// The request filter
IObservable GetAllMembers(int id, TeamMembersRequest request);
///
/// Returns all members with the specified role in the given team of the given role.
///
///
/// https://developer.github.com/v3/orgs/teams/#list-team-members
///
/// The team identifier
/// The request filter
/// Options to change API behaviour.
IObservable GetAllMembers(int id, TeamMembersRequest request, ApiOptions options);
///
/// Returns newly created for the current org.
///
/// Thrown when a general API error occurs.
/// Newly created
IObservable Create(string org, NewTeam team);
///
/// Returns updated for the current org.
///
/// Thrown when a general API error occurs.
/// Updated
IObservable Update(int id, UpdateTeam team);
///
/// Delete a team - must have owner permissions to this
///
/// Thrown when a general API error occurs.
///
IObservable Delete(int id);
///
/// Adds a to a .
///
///
/// See the API documentation for more information.
///
/// The team identifier.
/// The user to add to the team.
/// Additional parameters for the request
IObservable AddOrEditMembership(int id, string login, UpdateTeamMembership request);
///
/// Removes a from a .
///
///
/// See the API documentation for more information.
///
/// The team identifier.
/// The user to remove from the team.
/// if the user was removed from the team; otherwise.
IObservable RemoveMembership(int id, string login);
///
/// Gets whether the user with the given
/// is a member of the team with the given .
/// A is thrown if the user is not a member.
///
///
/// See the API documentation for more information.
///
/// The team to check.
/// The user to check.
IObservable GetMembershipDetails(int id, string login);
///
/// Returns all team's repositories.
///
/// Team Id.
/// Thrown when a general API error occurs.
/// The team's repositories
IObservable GetAllRepositories(int id);
///
/// Returns all team's repositories.
///
/// Team Id.
/// Options to change API behaviour.
/// Thrown when a general API error occurs.
/// The team's repositories
IObservable GetAllRepositories(int id, ApiOptions options);
///
/// Remove a repository from the team
///
/// Thrown when a general API error occurs.
///
IObservable RemoveRepository(int id, string organization, string repoName);
///
/// Adds a to a .
///
/// The team identifier.
/// Org to associate the repo with.
/// Name of the repo.
/// Thrown if you attempt to add a repository to a team that is not owned by the organization.
///
/// See the API documentation for more information.
///
/// if the repository was added to the team; otherwise.
IObservable AddRepository(int id, string organization, string repoName);
///
/// Adds a to a .
///
/// The team identifier.
/// Org to associate the repo with.
/// Name of the repo.
/// The permission to grant the team on this repository.
/// Thrown if you attempt to add a repository to a team that is not owned by the organization.
///
/// See the API documentation for more information.
///
/// if the repository was added to the team; otherwise.
IObservable AddRepository(int id, string organization, string repoName, RepositoryPermissionRequest permission);
///
/// Gets whether or not the given repository is managed by the given team.
///
/// The team identifier
/// Owner of the org the team is associated with.
/// Name of the repo.
///
/// See the API documentation for more information.
///
/// if the repository is managed by the given team; otherwise.
IObservable IsRepositoryManagedByTeam(int id, string owner, string repo);
///
/// List all pending invitations for the given team.
///
///
/// See the API Documentation
/// for more information.
///
/// The team identifier
///
IObservable GetAllPendingInvitations(int id);
///
/// List all pending invitations for the given team.
///
///
/// See the API Documentation
/// for more information.
///
/// The team identifier
/// Options to change API behaviour.
///
IObservable GetAllPendingInvitations(int id, ApiOptions options);
}
}