FileUploadCompletionNotification Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. device. FileUploadCompletionNotification
- com.
public class FileUploadCompletionNotification
The request payload to send to IoT Hub to notify it when a file upload is completed, whether successful or not. Must set whether the file upload was a success or not, and must set the correlation Id, but all other fields are optional.
Constructor Summary
Constructor | Description |
---|---|
FileUploadCompletionNotification() |
Empty constructor: Used only to keep GSON happy. |
FileUploadCompletionNotification(String correlationId, Boolean isSuccess) |
Create an instance of the FileUploadCompletionNotification for a single file upload operation using Azure Storage. |
FileUploadCompletionNotification(String correlationId, Boolean isSuccess, Integer statusCode, String statusDescription) |
Create an instance of the FileUploadCompletionNotification for a single file upload operation using Azure Storage. |
Method Summary
Modifier and Type | Method and Description |
---|---|
String | getCorrelationId() |
Integer | getStatusCode() |
String | getStatusDescription() |
Boolean | isSuccess() |
void |
setCorrelationId(String correlationId)
Set the correlationId that correlates this FileUploadCompletionNotification to the earlier request to get the SAS URI for this upload from IoT Hub. Must equal the correlation Id set in the FileUploadSasUriResponse associated with this file upload. |
void |
setStatusCode(Integer statusCode)
Set the status code associated with this file upload request |
void |
setStatusDescription(String statusDescription)
Set the status description associated with this file upload request |
void |
setSuccess(Boolean success)
Set if the file upload was a success |
String |
toJson()
Convert this class to json. |
Constructor Details
FileUploadCompletionNotification
public FileUploadCompletionNotification()
Empty constructor: Used only to keep GSON happy.
FileUploadCompletionNotification
public FileUploadCompletionNotification(String correlationId, Boolean isSuccess)
Create an instance of the FileUploadCompletionNotification for a single file upload operation using Azure Storage.
Parameters:
FileUploadCompletionNotification
public FileUploadCompletionNotification(String correlationId, Boolean isSuccess, Integer statusCode, String statusDescription)
Create an instance of the FileUploadCompletionNotification for a single file upload operation using Azure Storage.
Parameters:
Method Details
getCorrelationId
public String getCorrelationId()
Returns:
getStatusCode
public Integer getStatusCode()
Returns:
getStatusDescription
public String getStatusDescription()
Returns:
isSuccess
public Boolean isSuccess()
Returns:
setCorrelationId
public void setCorrelationId(String correlationId)
Set the correlationId that correlates this FileUploadCompletionNotification to the earlier request to get the SAS URI for this upload from IoT Hub. Must equal the correlation Id set in the FileUploadSasUriResponse associated with this file upload.
Parameters:
setStatusCode
public void setStatusCode(Integer statusCode)
Set the status code associated with this file upload request
Parameters:
setStatusDescription
public void setStatusDescription(String statusDescription)
Set the status description associated with this file upload request
Parameters:
setSuccess
public void setSuccess(Boolean success)
Set if the file upload was a success
Parameters:
toJson
public String toJson()
Convert this class to json.
Returns:
Applies to
Azure SDK for Java