Class RecycleBinRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.workitemtracking.recyclebin.RecycleBinRequestBuilder
Provides functionality to work with Work item recycle bin Api.
-
Nested Class Summary
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
ConstructorDescriptionRecycleBinRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptiondestroy
(int id) Destroys the specified work item permanently from the Recycle Bin.destroyAsync
(int id) Destroys the specified work item permanently from the Recycle Bin.get
(int id) Gets a deleted work item from Recycle Bin.getAsync
(int id) Gets a deleted work item from Recycle Bin.list()
Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.list
(int... ids) Gets the work items from the recycle bin, whose IDs have been specified in the parametersGets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.listAsync
(int... ids) Gets the work items from the recycle bin, whose IDs have been specified in the parametersrestore
(int id, boolean isDeleted) Restores the deleted work item from Recycle Bin.restoreAsync
(int id, boolean isDeleted) Restores the deleted work item from Recycle Bin.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
RecycleBinRequestBuilder
public RecycleBinRequestBuilder(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
-
destroyAsync
Destroys the specified work item permanently from the Recycle Bin. This action can not be undone.- Parameters:
id
- ID of the work item to be destroyed permanently- Throws:
AzDException
- Default Api exception handler.
-
getAsync
Gets a deleted work item from Recycle Bin.- Parameters:
id
- ID of the work item to be returned- Returns:
- Work item delete object
WorkItemDelete
- Throws:
AzDException
- Default Api exception handler.
-
listAsync
Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.- Returns:
- Collection of WorkItemDeleteShallowReference
WorkItemDeleteShallowReferences
- Throws:
AzDException
- Default Api exception handler.
-
listAsync
Gets the work items from the recycle bin, whose IDs have been specified in the parameters- Parameters:
ids
- Array of IDs of the deleted work items to be returned- Returns:
- Collection of WorkItemDeleteReference
WorkItemDeleteReferences
- Throws:
AzDException
- Default Api exception handler.
-
restoreAsync
public CompletableFuture<WorkItemDelete> restoreAsync(int id, boolean isDeleted) throws AzDException Restores the deleted work item from Recycle Bin.- Parameters:
id
- ID of the work item to be restoredisDeleted
- Sets a value indicating whether this work item is deleted.- Returns:
- Work item delete object
WorkItemDelete
- Throws:
AzDException
- Default Api exception handler.
-
destroy
Destroys the specified work item permanently from the Recycle Bin. This action can not be undone.- Parameters:
id
- ID of the work item to be destroyed permanently- Throws:
AzDException
- Default Api exception handler.
-
get
Gets a deleted work item from Recycle Bin.- Parameters:
id
- ID of the work item to be returned- Returns:
- Work item delete object
WorkItemDelete
- Throws:
AzDException
- Default Api exception handler.
-
list
Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.- Returns:
- Collection of WorkItemDeleteShallowReference
WorkItemDeleteShallowReferences
- Throws:
AzDException
- Default Api exception handler.
-
list
Gets the work items from the recycle bin, whose IDs have been specified in the parameters- Parameters:
ids
- Array of IDs of the deleted work items to be returned- Returns:
- Collection of WorkItemDeleteReference
WorkItemDeleteReferences
- Throws:
AzDException
- Default Api exception handler.
-
restore
Restores the deleted work item from Recycle Bin.- Parameters:
id
- ID of the work item to be restoredisDeleted
- Sets a value indicating whether this work item is deleted.- Returns:
- Work item delete object
WorkItemDelete
- Throws:
AzDException
- Default Api exception handler.
-