Package org.azd.release.approvals
Class ApprovalsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.release.approvals.ApprovalsRequestBuilder
Provides functionality to work with Release Approvals Api.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
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
ConstructorDescriptionApprovalsRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionlist()
Get a list of approvalslist
(Consumer<ApprovalsRequestBuilder.ListRequestConfiguration> requestConfiguration) Get a list of approvalsGet a list of approvalslistAsync
(Consumer<ApprovalsRequestBuilder.ListRequestConfiguration> requestConfiguration) Get a list of approvalsupdate
(int approvalId, ReleaseApproval releaseApproval) Update status of an approvalupdateAsync
(int approvalId, ReleaseApproval releaseApproval) Update status of an approvalMethods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
ApprovalsRequestBuilder
Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
listAsync
Get a list of approvals- Returns:
- List of release approvals
ReleaseApprovals
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
public CompletableFuture<ReleaseApprovals> listAsync(Consumer<ApprovalsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Get a list of approvals- Parameters:
requestConfiguration
- Consumer of query parameters.- Returns:
- List of release approvals
ReleaseApprovals
- Throws:
AzDException
- Default Api Exception handler.
-
updateAsync
public CompletableFuture<ReleaseApproval> updateAsync(int approvalId, ReleaseApproval releaseApproval) throws AzDException Update status of an approval- Parameters:
approvalId
- Id of the approval.releaseApproval
- Release approval object to approve.- Returns:
- Release approval object
ReleaseApproval
- Throws:
AzDException
- Default Api Exception handler.
-
list
Get a list of approvals- Returns:
- List of release approvals
ReleaseApprovals
- Throws:
AzDException
- Default Api Exception handler.
-
list
public ReleaseApprovals list(Consumer<ApprovalsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Get a list of approvals- Parameters:
requestConfiguration
- Consumer of query parameters.- Returns:
- List of release approvals
ReleaseApprovals
- Throws:
AzDException
- Default Api Exception handler.
-
update
Update status of an approval- Parameters:
approvalId
- Id of the approval.releaseApproval
- Release approval object to approve.- Returns:
- Release approval object
ReleaseApproval
- Throws:
AzDException
- Default Api Exception handler.
-