public GetSensitiveDataOccurrencesResult withError(String error) {
        setError(error);
        return this;
    }
<p>
If an error occurred when Amazon Macie attempted to retrieve occurrences of sensitive data reported by the
finding, a description of the error that occurred. This value is null if the status (status) of the request is
PROCESSING or SUCCESS.
</p>

@param error
       If an error occurred when Amazon Macie attempted to retrieve occurrences of sensitive data reported by the
       finding, a description of the error that occurred. This value is null if the status (status) of the
       request is PROCESSING or SUCCESS.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-macie2/src/main/java/com/amazonaws/services/macie2/model/GetSensitiveDataOccurrencesResult.java