FileUploadCompletionNotification Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. deps. serializer. 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 setSuccess(Boolean success) and setCorrelationId(String correlationId), but all other fields are optional.
Constructor Summary
Constructor | Description |
---|---|
FileUploadCompletionNotification() |
Empty constructor: Used only to keep GSON happy. |
FileUploadCompletionNotification(String json) |
Construct this notification with json |
FileUploadCompletionNotification(String correlationId, Boolean isSuccess) |
Create an instance of the File |
FileUploadCompletionNotification(String correlationId, Boolean isSuccess, Integer statusCode, String statusDescription) |
Create an instance of the File |
Method Summary
Modifier and Type | Method and Description |
---|---|
java.lang.String | getCorrelationId() |
java.lang.Integer | getStatusCode() |
java.lang.String | getStatusDescription() |
java.lang.Boolean | getSuccess() |
void |
setCorrelationId(String correlationId)
Set the correlation |
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 |
java.lang.String |
toJson()
Convert this class to json. |
Methods inherited from java.lang.Object
Constructor Details
FileUploadCompletionNotification
public FileUploadCompletionNotification()
Empty constructor: Used only to keep GSON happy.
FileUploadCompletionNotification
public FileUploadCompletionNotification(String json)
Construct this notification with json
Parameters:
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:
getSuccess
public Boolean getSuccess()
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 getCorrelationId().
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: