Package org.azd.git.repositories
Class RepositoriesRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.git.repositories.RepositoriesRequestBuilder
Repositories request builder to manage Git repositories Api.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the query parameters.static class
Request configuration object for the query parameters.Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter
-
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer
-
Constructor Summary
ConstructorDescriptionRepositoriesRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(RepositoryRequest repositoryRequest) Create a git repository in a team project.create
(RepositoryRequest repositoryRequest, String sourceRef) Create a git repository in a team project.createAsync
(RepositoryRequest repositoryRequest) Create a git repository in a team project.createAsync
(RepositoryRequest repositoryRequest, String sourceRef) Create a git repository in a team project.Delete a git repositorydeleteAsync
(String repositoryId) Delete a git repositoryRetrieve a git repository.Retrieve a git repository with parent.Retrieve a git repository.Retrieve a git repository with parent.list()
Retrieve git repositories.list
(Consumer<RepositoriesRequestBuilder.RequestConfiguration> requestConfiguration) Retrieve git repositories.Retrieve git repositories.listAsync
(Consumer<RepositoriesRequestBuilder.RequestConfiguration> requestConfiguration) Retrieve git repositories.Retrieve deleted git repositories.Retrieve deleted git repositories.Request builder to manage recycle bin repositories.update
(String repositoryId, GitRepository gitRepository) Updates the Git repository with either a new repo name or a new default branch.updateAsync
(String repositoryId, GitRepository gitRepository) Updates the Git repository with either a new repo name or a new default branch.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
RepositoriesRequestBuilder
public RepositoriesRequestBuilder(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
-
recycleBin
Request builder to manage recycle bin repositories.- Returns:
- RecycleBinRepositoriesRequestBuilder
RecycleBinRepositoriesRequestBuilder
.
-
createAsync
public CompletableFuture<GitRepository> createAsync(RepositoryRequest repositoryRequest) throws AzDException Create a git repository in a team project.- Parameters:
repositoryRequest
- New repository request.- Returns:
- git repository object
GitRepository
- Throws:
AzDException
- Default Api Exception handler.
-
createAsync
public CompletableFuture<GitRepository> createAsync(RepositoryRequest repositoryRequest, String sourceRef) throws AzDException Create a git repository in a team project.- Parameters:
repositoryRequest
- New repository request.sourceRef
- Specify the source refs to use while creating a fork repo- Returns:
- git repository object
GitRepository
- Throws:
AzDException
- Default Api Exception handler.
-
deleteAsync
Delete a git repository- Parameters:
repositoryId
- pass the repository id- Throws:
AzDException
- Default Api Exception handler.
-
listDeletedAsync
Retrieve deleted git repositories.- Returns:
- Git deleted repository object
GitDeletedRepositories
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
Retrieve a git repository.- Parameters:
repositoryName
- pass the repository name- Returns:
- git repository object
GitRepository
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<GitRepository> getAsync(String repositoryName, boolean includeParent) throws AzDException Retrieve a git repository with parent.- Parameters:
repositoryName
- pass the repository nameincludeParent
- True to include parent repository.- Returns:
- git repository object
GitRepository
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
Retrieve git repositories.- Returns:
- array of git repositories
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
public CompletableFuture<Repositories> listAsync(Consumer<RepositoriesRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Retrieve git repositories.- Parameters:
requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- array of git repositories
- Throws:
AzDException
- Default Api Exception handler.
-
updateAsync
public CompletableFuture<GitRepository> updateAsync(String repositoryId, GitRepository gitRepository) throws AzDException Updates the Git repository with either a new repo name or a new default branch.- Parameters:
repositoryId
- provide the repository idgitRepository
- Git repository object to update.- Returns:
- a future repository object
GitRepository
- Throws:
AzDException
- Default Api Exception handler.
-
create
Create a git repository in a team project.- Parameters:
repositoryRequest
- New repository request.- Returns:
- git repository object
GitRepository
- Throws:
AzDException
- Default Api Exception handler.
-
create
public GitRepository create(RepositoryRequest repositoryRequest, String sourceRef) throws AzDException Create a git repository in a team project.- Parameters:
repositoryRequest
- New repository request.sourceRef
- Specify the source refs to use while creating a fork repo- Returns:
- git repository object
GitRepository
- Throws:
AzDException
- Default Api Exception handler.
-
delete
Delete a git repository- Parameters:
repositoryId
- pass the repository id- Throws:
AzDException
- Default Api Exception handler.
-
listDeleted
Retrieve deleted git repositories.- Returns:
- Git deleted repository object
GitDeletedRepositories
- Throws:
AzDException
- Default Api Exception handler.
-
get
Retrieve a git repository.- Parameters:
repositoryName
- pass the repository name- Returns:
- git repository object
GitRepository
- Throws:
AzDException
- Default Api Exception handler.
-
get
Retrieve a git repository with parent.- Parameters:
repositoryName
- pass the repository nameincludeParent
- True to include parent repository.- Returns:
- git repository object
GitRepository
- Throws:
AzDException
- Default Api Exception handler.
-
list
Retrieve git repositories.- Returns:
- array of git repositories
- Throws:
AzDException
- Default Api Exception handler.
-
list
public Repositories list(Consumer<RepositoriesRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Retrieve git repositories.- Parameters:
requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- array of git repositories
- Throws:
AzDException
- Default Api Exception handler.
-
update
Updates the Git repository with either a new repo name or a new default branch.- Parameters:
repositoryId
- provide the repository idgitRepository
- Git repository object to update.- Returns:
- a future repository object
GitRepository
- Throws:
AzDException
- Default Api Exception handler.
-