Class WorkItemTrackingAttachmentsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.workitemtracking.attachments.WorkItemTrackingAttachmentsRequestBuilder
Provides functionality to work with work item attachments Api.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the query parameters.static classRequest configuration object for the query parameters.static classRepresents the query parameters.static classRequest 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
ConstructorsConstructorDescriptionWorkItemTrackingAttachmentsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreate(InputStream contents, Consumer<WorkItemTrackingAttachmentsRequestBuilder.CreateRequestConfiguration> requestConfiguration) Uploads an attachment.createAsync(InputStream contents, Consumer<WorkItemTrackingAttachmentsRequestBuilder.CreateRequestConfiguration> requestConfiguration) Uploads an attachment.get(String id, Consumer<WorkItemTrackingAttachmentsRequestBuilder.GetRequestConfiguration> requestConfiguration) Downloads an attachment.getAsync(String id, Consumer<WorkItemTrackingAttachmentsRequestBuilder.GetRequestConfiguration> requestConfiguration) Downloads an attachment.getAsZip(String id, Consumer<WorkItemTrackingAttachmentsRequestBuilder.GetRequestConfiguration> requestConfiguration) Downloads an attachment.getAsZipAsync(String id, Consumer<WorkItemTrackingAttachmentsRequestBuilder.GetRequestConfiguration> requestConfiguration) Downloads an attachment.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
WorkItemTrackingAttachmentsRequestBuilder
public WorkItemTrackingAttachmentsRequestBuilder(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
-
createAsync
public CompletableFuture<AttachmentReference> createAsync(InputStream contents, Consumer<WorkItemTrackingAttachmentsRequestBuilder.CreateRequestConfiguration> requestConfiguration) throws AzDException Uploads an attachment. On accounts with higher attachment upload limits (greater than 130MB), you will need to use chunked upload.- Parameters:
contents- Stream to upload. Payload to create the attachment.requestConfiguration- Represents the query parameters.- Returns:
- AttachmentReference
AttachmentReference - Throws:
AzDException- Default Api exception handler.
-
getAsync
public CompletableFuture<InputStream> getAsync(String id, Consumer<WorkItemTrackingAttachmentsRequestBuilder.GetRequestConfiguration> requestConfiguration) throws AzDException Downloads an attachment.- Parameters:
id- Attachment IDrequestConfiguration- Represents the query parameters.- Returns:
- Stream of the attachment content. Use
StreamHelperto download the attachment contents to a file. - Throws:
AzDException- Default Api exception handler.
-
getAsZipAsync
public CompletableFuture<InputStream> getAsZipAsync(String id, Consumer<WorkItemTrackingAttachmentsRequestBuilder.GetRequestConfiguration> requestConfiguration) throws AzDException Downloads an attachment.- Parameters:
id- Attachment IDrequestConfiguration- Represents the query parameters.- Returns:
- Stream of the attachment content. Use
StreamHelperto download the attachment contents to a file. - Throws:
AzDException- Default Api exception handler.
-
create
public AttachmentReference create(InputStream contents, Consumer<WorkItemTrackingAttachmentsRequestBuilder.CreateRequestConfiguration> requestConfiguration) throws AzDException Uploads an attachment. On accounts with higher attachment upload limits (greater than 130MB), you will need to use chunked upload.- Parameters:
contents- Stream to upload. Payload to create the attachment.requestConfiguration- Represents the query parameters.- Returns:
- AttachmentReference
AttachmentReference - Throws:
AzDException- Default Api exception handler.
-
get
public InputStream get(String id, Consumer<WorkItemTrackingAttachmentsRequestBuilder.GetRequestConfiguration> requestConfiguration) throws AzDException Downloads an attachment.- Parameters:
id- Attachment IDrequestConfiguration- Represents the query parameters.- Returns:
- Stream of the attachment content. Use
StreamHelperto download the attachment contents to a file. - Throws:
AzDException- Default Api exception handler.
-
getAsZip
public InputStream getAsZip(String id, Consumer<WorkItemTrackingAttachmentsRequestBuilder.GetRequestConfiguration> requestConfiguration) throws AzDException Downloads an attachment.- Parameters:
id- Attachment IDrequestConfiguration- Represents the query parameters.- Returns:
- Stream of the attachment content. Use
StreamHelperto download the attachment contents to a file. - Throws:
AzDException- Default Api exception handler.
-