Class RecycleBinRepositoriesRequestBuilder

java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.git.repositories.RecycleBinRepositoriesRequestBuilder

public class RecycleBinRepositoriesRequestBuilder extends BaseRequestBuilder
Recycle bin repositories request builder to manage Git recycle bin repositories Api.
  • Constructor Details

    • RecycleBinRepositoriesRequestBuilder

      public RecycleBinRepositoriesRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential)
      Instantiates a new RequestBuilder instance and sets the default values.
      Parameters:
      organizationUrl - Represents organization location request url.
      accessTokenCredential - Access token credential object.
  • Method Details

    • deleteAsync

      public CompletableFuture<Void> deleteAsync(String repositoryId) throws AzDException
      Destroy (hard delete) a soft-deleted Git repository.
      Parameters:
      repositoryId - pass the repository id
      Throws:
      AzDException - Default Api Exception handler.
    • listAsync

      Retrieve soft-deleted git repositories from the recycle bin.
      Returns:
      array of git deleted recycle bin repositories
      Throws:
      AzDException - Default Api Exception handler.
    • restoreAsync

      public CompletableFuture<GitRepository> restoreAsync(String repositoryId, boolean deleted) throws AzDException
      Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable.
      Parameters:
      repositoryId - pass the repository id
      deleted - Setting to false will undo earlier deletion and restore the repository.
      Returns:
      object of git repository GitRepository
      Throws:
      AzDException - Default Api Exception handler.
    • delete

      public Void delete(String repositoryId) throws AzDException
      Destroy (hard delete) a soft-deleted Git repository.
      Parameters:
      repositoryId - pass the repository id
      Throws:
      AzDException - Default Api Exception handler.
    • list

      public GitDeletedRepositories list() throws AzDException
      Retrieve soft-deleted git repositories from the recycle bin.
      Returns:
      array of git deleted recycle bin repositories
      Throws:
      AzDException - Default Api Exception handler.
    • restore

      public GitRepository restore(String repositoryId, boolean deleted) throws AzDException
      Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable.
      Parameters:
      repositoryId - pass the repository id
      deleted - Setting to false will undo earlier deletion and restore the repository.
      Returns:
      object of git repository GitRepository
      Throws:
      AzDException - Default Api Exception handler.