Package org.azd.core.projects
Class ProjectsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.core.projects.ProjectsRequestBuilder
Builder class that constructs requests for Core Projects Api.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the query parameters.static class
Represents the query parameters.static class
Request configuration object for 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
ConstructorDescriptionProjectsRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(ProjectCreationParameters projectCreationParameters) Creates a project for given process idcreateAsync
(ProjectCreationParameters projectCreationParameters) Creates a project for given process idQueues a project to be deleted.deleteAsync
(String projectId) Queues a project to be deleted.get()
Get the current project.Get project with the specified id or nameget
(String projectId, Consumer<ProjectsRequestBuilder.RequestConfiguration> requestConfiguration) Get project with the specified id or namegetAsync()
Get the current project.Get project with the specified id or namegetAsync
(String projectId, Consumer<ProjectsRequestBuilder.RequestConfiguration> requestConfiguration) Get project with the specified id or namelist()
Get all projects in the organization that the authenticated user has access to.list
(Consumer<ProjectsRequestBuilder.ListRequestConfiguration> requestConfiguration) Get all projects in the organization that the authenticated user has access to.Get all projects in the organization that the authenticated user has access to.listAsync
(Consumer<ProjectsRequestBuilder.ListRequestConfiguration> requestConfiguration) Get all projects in the organization that the authenticated user has access to.Provides functionality to manage Project properties Api.Update an existing project's name, abbreviation, description, or restore a project.updateAsync
(String projectId, Project project) Update an existing project's name, abbreviation, description, or restore a project.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
ProjectsRequestBuilder
Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
properties
Provides functionality to manage Project properties Api.- Returns:
- PropertiesRequestBuilder
PropertiesRequestBuilder
-
createAsync
public CompletableFuture<OperationReference> createAsync(ProjectCreationParameters projectCreationParameters) throws AzDException Creates a project for given process id- Parameters:
projectCreationParameters
- Request body to create a new project.- Returns:
- object with link to the project
- Throws:
AzDException
- Default Api Exception handler.
-
deleteAsync
Queues a project to be deleted.You should pass the project id to delete it. Passing the project name won't delete. To get the project id run getProject() with projectName and get the Id.
- Parameters:
projectId
- pass the project id- Returns:
- object of deleted project with url
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
Get project with the specified id or name- Parameters:
projectId
- pass the project name or id- Returns:
- project object
Project
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<Project> getAsync(String projectId, Consumer<ProjectsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get project with the specified id or name- Parameters:
projectId
- pass the project name or id- Returns:
- project object
Project
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
Get the current project. This should be set when creating the service client object using AzureDevOpsServicesAzDService
- Returns:
- project object
Project
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
Get all projects in the organization that the authenticated user has access to.- Returns:
- array of project
Projects
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
public CompletableFuture<Projects> listAsync(Consumer<ProjectsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Get all projects in the organization that the authenticated user has access to.- Parameters:
requestConfiguration
- Consumer of request configuration that represent the query parameters.- Returns:
- array of project
Projects
- Throws:
AzDException
- Default Api Exception handler.
-
updateAsync
public CompletableFuture<OperationReference> updateAsync(String projectId, Project project) throws AzDException Update an existing project's name, abbreviation, description, or restore a project.- Parameters:
projectId
- The project id of the project to update.project
- Project object to perform update operation.- Returns:
- OperationReference object
OperationReference
- Throws:
AzDException
- Default Api Exception handler.
-
create
public OperationReference create(ProjectCreationParameters projectCreationParameters) throws AzDException Creates a project for given process id- Parameters:
projectCreationParameters
- Request body to create a new project.- Returns:
- object with link to the project
- Throws:
AzDException
- Default Api Exception handler.
-
delete
Queues a project to be deleted.You should pass the project id to delete it. Passing the project name won't delete. To get the project id run getProject() with projectName and get the Id.
- Parameters:
projectId
- pass the project id- Returns:
- object of deleted project with url
- Throws:
AzDException
- Default Api Exception handler.
-
get
Get project with the specified id or name- Parameters:
projectId
- pass the project name or id- Returns:
- project object
Project
- Throws:
AzDException
- Default Api Exception handler.
-
get
public Project get(String projectId, Consumer<ProjectsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get project with the specified id or name- Parameters:
projectId
- pass the project name or id- Returns:
- project object
Project
- Throws:
AzDException
- Default Api Exception handler.
-
get
Get the current project. This should be set when creating the service client object using AzureDevOpsServicesAzDService
- Returns:
- project object
Project
- Throws:
AzDException
- Default Api Exception handler.
-
list
Get all projects in the organization that the authenticated user has access to.- Returns:
- array of project
Projects
- Throws:
AzDException
- Default Api Exception handler.
-
list
public Projects list(Consumer<ProjectsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Get all projects in the organization that the authenticated user has access to.- Parameters:
requestConfiguration
- Consumer of request configuration that represent the query parameters.- Returns:
- array of project
Projects
- Throws:
AzDException
- Default Api Exception handler.
-
update
Update an existing project's name, abbreviation, description, or restore a project.- Parameters:
projectId
- The project id of the project to update.project
- Project object to perform update operation.- Returns:
- OperationReference object
OperationReference
- Throws:
AzDException
- Default Api Exception handler.
-