using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; namespace Octokit.Reactive { /// /// A client for GitHub's Repository Branches API. /// /// /// See the Repository Branches API documentation for more details. /// public interface IObservableRepositoryBranchesClient { /// /// Gets all the branches for the specified repository. /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository IObservable GetAll(string owner, string name); /// /// Gets all the branches for the specified repository. /// /// /// See the API documentation for more details /// /// The ID of the repository IObservable GetAll(long repositoryId); /// /// Gets all the branches for the specified repository. /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// Options for changing the API response IObservable GetAll(string owner, string name, ApiOptions options); /// /// Gets all the branches for the specified repository. /// /// /// See the API documentation for more details /// /// The ID of the repository /// Options for changing the API response IObservable GetAll(long repositoryId, ApiOptions options); /// /// Gets the specified branch. /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")] IObservable Get(string owner, string name, string branch); /// /// Gets the specified branch. /// /// /// See the API documentation for more details /// /// The ID of the repository /// The name of the branch [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")] IObservable Get(long repositoryId, string branch); /// /// Get the branch protection settings for the specified branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable GetBranchProtection(string owner, string name, string branch); /// /// Get the branch protection settings for the specified branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable GetBranchProtection(long repositoryId, string branch); /// /// Update the branch protection settings for the specified branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// Branch protection settings IObservable UpdateBranchProtection(string owner, string name, string branch, BranchProtectionSettingsUpdate update); /// /// Update the branch protection settings for the specified branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// Branch protection settings IObservable UpdateBranchProtection(long repositoryId, string branch, BranchProtectionSettingsUpdate update); /// /// Remove the branch protection settings for the specified branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable DeleteBranchProtection(string owner, string name, string branch); /// /// Remove the branch protection settings for the specified branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable DeleteBranchProtection(long repositoryId, string branch); /// /// Get the required status checks for the specified branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable GetRequiredStatusChecks(string owner, string name, string branch); /// /// Get the required status checks for the specified branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable GetRequiredStatusChecks(long repositoryId, string branch); /// /// Replace required status checks for the specified branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// Required status checks IObservable UpdateRequiredStatusChecks(string owner, string name, string branch, BranchProtectionRequiredStatusChecksUpdate update); /// /// Replace required status checks for the specified branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// Required status checks IObservable UpdateRequiredStatusChecks(long repositoryId, string branch, BranchProtectionRequiredStatusChecksUpdate update); /// /// Remove required status checks for the specified branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable DeleteRequiredStatusChecks(string owner, string name, string branch); /// /// Remove required status checks for the specified branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable DeleteRequiredStatusChecks(long repositoryId, string branch); /// /// Get the required status checks contexts for the specified branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable GetAllRequiredStatusChecksContexts(string owner, string name, string branch); /// /// Get the required status checks contexts for the specified branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable GetAllRequiredStatusChecksContexts(long repositoryId, string branch); /// /// Replace the required status checks contexts for the specified branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// The contexts to replace IObservable UpdateRequiredStatusChecksContexts(string owner, string name, string branch, IReadOnlyList contexts); /// /// Replace the required status checks contexts for the specified branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// The contexts to replace IObservable UpdateRequiredStatusChecksContexts(long repositoryId, string branch, IReadOnlyList contexts); /// /// Add the required status checks context for the specified branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// The contexts to add IObservable AddRequiredStatusChecksContexts(string owner, string name, string branch, IReadOnlyList contexts); /// /// Add the required status checks contexts for the specified branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// The contexts to add IObservable AddRequiredStatusChecksContexts(long repositoryId, string branch, IReadOnlyList contexts); /// /// Remove the required status checks context for the specified branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// The contexts to remove IObservable DeleteRequiredStatusChecksContexts(string owner, string name, string branch, IReadOnlyList contexts); /// /// Remove the required status checks contexts for the specified branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// The contexts to remove IObservable DeleteRequiredStatusChecksContexts(long repositoryId, string branch, IReadOnlyList contexts); /// /// Get required pull request review enforcement of protected branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable GetReviewEnforcement(string owner, string name, string branch); /// /// Get required pull request review enforcement of protected branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable GetReviewEnforcement(long repositoryId, string branch); /// /// Update required pull request review enforcement of protected branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// The required pull request review settings IObservable UpdateReviewEnforcement(string owner, string name, string branch, BranchProtectionRequiredReviewsUpdate update); /// /// Update required pull request review enforcement of protected branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// The required pull request review settings IObservable UpdateReviewEnforcement(long repositoryId, string branch, BranchProtectionRequiredReviewsUpdate update); /// /// Remove required pull request review enforcement of protected branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable RemoveReviewEnforcement(string owner, string name, string branch); /// /// Remove required pull request review enforcement of protected branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable RemoveReviewEnforcement(long repositoryId, string branch); /// /// Get admin enforcement of protected branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable GetAdminEnforcement(string owner, string name, string branch); /// /// Get admin enforcement of protected branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable GetAdminEnforcement(long repositoryId, string branch); /// /// Add admin enforcement to protected branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable AddAdminEnforcement(string owner, string name, string branch); /// /// Add admin enforcement to protected branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable AddAdminEnforcement(long repositoryId, string branch); /// /// Remove admin enforcement on protected branch /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable RemoveAdminEnforcement(string owner, string name, string branch); /// /// Remove admin enforcement on protected branch /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable RemoveAdminEnforcement(long repositoryId, string branch); /// /// Get the restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable GetProtectedBranchRestrictions(string owner, string name, string branch); /// /// Get the restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable GetProtectedBranchRestrictions(long repositoryId, string branch); /// /// Remove restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable DeleteProtectedBranchRestrictions(string owner, string name, string branch); /// /// Remove restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable DeleteProtectedBranchRestrictions(long repositoryId, string branch); /// /// Get team restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable GetAllProtectedBranchTeamRestrictions(string owner, string name, string branch); /// /// Get team restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable GetAllProtectedBranchTeamRestrictions(long repositoryId, string branch); /// /// Replace team restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// List of teams with push access IObservable UpdateProtectedBranchTeamRestrictions(string owner, string name, string branch, BranchProtectionTeamCollection teams); /// /// Replace team restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// List of teams with push access IObservable UpdateProtectedBranchTeamRestrictions(long repositoryId, string branch, BranchProtectionTeamCollection teams); /// /// Add team restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// List of teams with push access IObservable AddProtectedBranchTeamRestrictions(string owner, string name, string branch, BranchProtectionTeamCollection teams); /// /// Add team restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// List of teams with push access IObservable AddProtectedBranchTeamRestrictions(long repositoryId, string branch, BranchProtectionTeamCollection teams); /// /// Remove team restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// List of teams to remove IObservable DeleteProtectedBranchTeamRestrictions(string owner, string name, string branch, BranchProtectionTeamCollection teams); /// /// Remove team restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// List of teams to remove IObservable DeleteProtectedBranchTeamRestrictions(long repositoryId, string branch, BranchProtectionTeamCollection teams); /// /// Get user restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch IObservable GetAllProtectedBranchUserRestrictions(string owner, string name, string branch); /// /// Get user restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch IObservable GetAllProtectedBranchUserRestrictions(long repositoryId, string branch); /// /// Replace user restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// List of users with push access IObservable UpdateProtectedBranchUserRestrictions(string owner, string name, string branch, BranchProtectionUserCollection users); /// /// Replace user restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// List of users with push access IObservable UpdateProtectedBranchUserRestrictions(long repositoryId, string branch, BranchProtectionUserCollection users); /// /// Add user restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// List of users with push access to add IObservable AddProtectedBranchUserRestrictions(string owner, string name, string branch, BranchProtectionUserCollection users); /// /// Add user restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// List of users with push access to add IObservable AddProtectedBranchUserRestrictions(long repositoryId, string branch, BranchProtectionUserCollection users); /// /// Remove user restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// List of users with push access to remove IObservable DeleteProtectedBranchUserRestrictions(string owner, string name, string branch, BranchProtectionUserCollection users); /// /// Remove user restrictions for the specified branch (applies only to Organization owned repositories) /// /// /// See the API documentation for more details /// /// The Id of the repository /// The name of the branch /// List of users with push access to remove IObservable DeleteProtectedBranchUserRestrictions(long repositoryId, string branch, BranchProtectionUserCollection users); } }